I have a directory with the files,
1st: I want to Diplay each filename, underline it
2nd: Display the contents under the filename and
3rd: Redirect the above content to other file
4th: Remove the files from the directory
#!/bin/ksh
for i in $( cat $a/b/c.txt )
do
echo " Contents of the files " > $t1/t2/content.txt
echo " ===================================================== " >> $t1/t2/content.txt
echo $i >> $t1/t2/content.txt; cat $i >> $t1/t2/content.txt
rm $i
done
Desired out put in redirected file:
Filename1:
==========
Content of Filname1
Filename2:
=========
Content of Filename2
Thanks