Issue with Splitting of file
Posted: Thu May 17, 2007 4:51 am
HI! All
Iam running this script for splitting the file in command stage ,attacth a timesatmp to it and then conver it to .tmp extension
cd /home/staff/thussain
Prefix=Z_PRICE_NEW_`date "+%Y%m%d%H%M%S"`
split -3000 -a 5 /home/staff/thussain/Z_PRICE_NEW.txt $Prefix
find . -name "$Prefix*" -print | {
while read FILE;
do
mv $FILE $FILE.tmp
done
}
example out put
Z_PRICE_NEW_20070517014630aaaac.tmp
Z_PRICE_NEW_20070517014630aaaaa.tmp.tmp
but some files are coming with tmp extension twice ,and any on tell me how to resolve this issue..
Thanks in Advance
Regards
Tausif
Iam running this script for splitting the file in command stage ,attacth a timesatmp to it and then conver it to .tmp extension
cd /home/staff/thussain
Prefix=Z_PRICE_NEW_`date "+%Y%m%d%H%M%S"`
split -3000 -a 5 /home/staff/thussain/Z_PRICE_NEW.txt $Prefix
find . -name "$Prefix*" -print | {
while read FILE;
do
mv $FILE $FILE.tmp
done
}
example out put
Z_PRICE_NEW_20070517014630aaaac.tmp
Z_PRICE_NEW_20070517014630aaaaa.tmp.tmp
but some files are coming with tmp extension twice ,and any on tell me how to resolve this issue..
Thanks in Advance
Regards
Tausif