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? Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/274410-bash-sh-script-help/#findComment-1412428 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.