mikem1034 Posted February 12, 2013 Share Posted February 12, 2013 Hi! I need to create a script that will create a file and dump formatted text into it. I need to run the script with an argument which will be the filename. #!/bin/sh echo "Hello world" > ../directory/$arg1.txt I need the text added to the file to be like: class Arg1 { public function x() { .... } } Can anybody help me create a script to do this? Link to comment https://forums.phpfreaks.com/topic/274410-bash-sh-script-help/ Share on other sites More sharing options...
trq Posted February 13, 2013 Share Posted February 13, 2013 How about you try and write it and come back when you have a specific issue? The example you posted really isn't that far off. Link to comment https://forums.phpfreaks.com/topic/274410-bash-sh-script-help/#findComment-1412187 Share on other sites More sharing options...
jazzman1 Posted February 14, 2013 Share Posted February 14, 2013 How did you solve the issue? I know how to do this, but the principle of that forum is to share solutions to each other. Link to comment https://forums.phpfreaks.com/topic/274410-bash-sh-script-help/#findComment-1412428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.