I wrote a script as below

#!/bin/bash
echo $1 > temp
cat $2 >> temp
mv temp $2 # this command helps us to retain the original name of the file #

now how to append the script so tht it now inserts the first argument into the middle of the file and also the original file must retain its original name. [IMG]http://www.unix.com/images/buttons/edit.gif[/IMG]

>> now how to append the script so tht it now inserts the first argument into the middle of the file and also the original file must retain its original name.
Not clear what you wanna do??
append the script => append which script? append TO what?
middle of the file => Which file?
original file => Which is the original file?