writing a shell script
Posted: Thu Aug 26, 2004 7:07 pm
im writing a shell script for a blog, and I want to be able to type "./blog.sh" then my content, and write it to a file in the format yyyy-mm-dd.php
so far this is what I have:
pathetic, eh?
I need to do something like write $1 $date.php or something...
I also need to make it so that it will be interpreted as a string or something, because it wont echo more than one word, and any symbols besides letters and numbers break it... thanks
it would also be helpful to have charachters like ' be auto escaped.
thanks to anyone who can help.
so far this is what I have:
Code: Select all
#!/bin/sh
echo $1I need to do something like write $1 $date.php or something...
I also need to make it so that it will be interpreted as a string or something, because it wont echo more than one word, and any symbols besides letters and numbers break it... thanks
it would also be helpful to have charachters like ' be auto escaped.
thanks to anyone who can help.