RedHat (rhelsvrbase64-6.2) バージョンを使用しています。ファイル (つまり、utf-16le 形式) を UTF-8 形式に変換する incron ジョブを作成しました。
When i am running my job, It is creating multiple UTF-8 copies of my file.
My incrontab script is as follows:
**/home/sap/SRMArchive/incronTest IN_CLOSE_WRITE /usr/local/bin/test.sh $@ $#**
test.sh
**#!/bin/bash
echo "hi">>/var/log/my.log
echo $1>>/var/log/my.log
echo $2>>/var/log/my.log
file -bi $1/$2 >>/var/log/my.log
iconv -f utf-16le -t UTF-8 $1/$2 > $1/UTF8_$2**
When i am dropping any file to my '/home/sap/SRMArchive/incronTest' folder, The output i am getting is number of files named as follows :
UTF8_myFile.txt
UTF8_UTF8_myFile.txt
UTF8_UTF8_UTF8_myFile.txt
UTF8_UTF8_UTF8_UTF8_myFile.txt
.........
........
Thanks in advance