1

Inserting text into a new file

view story
linux-howto

http://www.unix.com – Hi all, I want to create a file and then insert some text into it. I'm trying to create a .sh script that will create a new python file from a template. Can someone tell me why this won't work, Code: touch $1 | sed -e '1i\Some test code here' Sorry I'm quite new to all this! Just as a side question, I know that $ is the regex for the last line, but what is the symbol for the first line in a file? Thanks in advance! Andrew (HowTos)