Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to save as script?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to save as script?
Authored by: mediaman on Nov 26, '02 11:44:50AM

How do you save this as a terminal script? Or where can I find info on how to save terminal scripts?



[ Reply to This | # ]
How to save as script?
Authored by: thinkyhead on Nov 26, '02 08:09:25PM

1. put the script into a text file.
2. make sure the text file has unix linefeeds
3. make sure the script starts with #!/bin/sh (preferably)
4. "chmod u+x filename" to make it executable by its owner
5. put the script into a folder included in the execution path

Q: How do I get Unix linefeeds?
A: Edit with pico, vi, joe, or BBEdit (which has unix as an option)

Q: What folders are in the execution path?
A: "echo $path; echo $PATH"

Q: What if I want everyone to be able to execute my script?
A: "chmod a+x filename" ... or better "man chmod"



[ Reply to This | # ]
How to save as script?
Authored by: hembeck on Nov 26, '02 11:22:59PM

Once more in english :)



[ Reply to This | # ]
How to save as script?
Authored by: mediaman on Nov 27, '02 04:49:02PM

Thanks for the info. Much needed =:0)



[ Reply to This | # ]