Hi all, I'm a student and a real bad student when it comes to shell scripts.
The question given is,
Shell script that accepts filenames specified as arguments and creates a shell script that contains this file as well as the code to recreate these files. Thus if the script generated by your script is executed, it would recreate the original files.
The script is as follows:
#!bin/sh
echo "This is my recreated file"
for i in $*
do
echo "cat>>$i<<start
`cat $i`
start"
done>MYFILE
Can someone please explain what exactly this script does and the working of it?