View Full Version : Script Running
Powermaster
June 13th, 2002, 02:00 PM
How do I run a .sh script? And where can I download the software to run it? (Mac X ofcourse)
BSDimwit
June 13th, 2002, 02:37 PM
just tell it to run it via the command line (make sure that its executable)
download your script.sh
chmod 755 script.sh (makes it executable)
./script.sh will run it. If you save it in a directory that is in your $PATH variable, you don't need the ./ in front of the name. Or you can use the absolute path to call it as well....like so
/Users/todd/script.sh
using the ./ infront of the script basically tells the shells where your script is...
./ = current working directory (actually . does but that another tutorial)
also you can type
sh script.sh
Hmm, now that I think of it, I am not sure if mac osx comes with bourne shell or not... If not, then you will need to install it... I would go with bash or ksh instead though, way better and they can run bourne shell scripts out of the box. You can download bash from apple.com under the macosx/downloads/unix apps area.
Hope this helps
BSDimwit
June 13th, 2002, 05:01 PM
zsh should be able to run most bourne shell scripts... according to zsh's website. It too is a superset of bourne shell with some nifty command line editing and globbing features... give it a try with zsh... if it doesn't work, get bash from apples website.
Powermaster
June 14th, 2002, 10:47 PM
Thanks I got it :')
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.3.2