#!/bin/ksh
if test -f file6.txt
then
rm file6.txt
fi
a=`date +"%F"`
awk '{print $0,"$a"}' file3.txt > file6.txt
-----------------------------------------------------------------
i need to append date at the end of each line in file 3 and o/p it to file6.txt
Dear ali560045,
try this
a=`date +"%F"`
awk -v DATE="$a" '{print $0 DATE}' file3.txt > file6.txt
good luk
Pankaj
Thnaks i got it..wat if i want to input the date only at file 3 and not in file 6...
Dear ali560045,
u r doing exactly same what u need
u need to rename the file6.txt to file3.txt
just add another line
rm file3.txt
mv file6.txt file3.txt
regards,
Pankaj