image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old June 13th, 2002, 03:00 PM
Powermaster's Avatar
Site Supporter
 
Join Date: Dec 2001
Location: ATA Bus 0 Dev 0
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Powermaster is on a distinguished road
Script Running

How do I run a .sh script? And where can I download the software to run it? (Mac X ofcourse)
__________________
--Powermaster
Http://www.powermaster.cc

About me:
http://www.JasonReam.com
Reply With Quote
  #2  
Old June 13th, 2002, 03:37 PM
Registered User
 
Join Date: Mar 2002
Location: Denver
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
BSDimwit is on a distinguished road
you can be able to run it already

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
Titanium Powerbook 550
512MB ram
Reply With Quote
  #3  
Old June 13th, 2002, 06:01 PM
Registered User
 
Join Date: Mar 2002
Location: Denver
Posts: 134
Thanks: 0
Thanked 0 Times in 0 Posts
BSDimwit is on a distinguished road
actually

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.
__________________
BSDimwit
Titanium Powerbook 550
512MB ram
Reply With Quote
  #4  
Old June 14th, 2002, 11:47 PM
Powermaster's Avatar
Site Supporter
 
Join Date: Dec 2001
Location: ATA Bus 0 Dev 0
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Powermaster is on a distinguished road
Thanks I got it :')
__________________
--Powermaster
Http://www.powermaster.cc

About me:
http://www.JasonReam.com
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems running CGI-scripts in Apache. Claruz Design & Media 9 September 23rd, 2003 08:06 PM
Getting a CGI script to work locally on my Mac simX Mac OS X System & Mac Software 11 July 12th, 2002 02:43 PM
HOW TO STOP SPAM -- join the fight! GadgetLover Apple News, Rumors & Discussion 11 April 11th, 2002 03:52 PM
AppleScript front end to a shell script? meancode Mac OS X System & Mac Software 0 March 17th, 2002 09:25 PM


All times are GMT -5. The time now is 03:31 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.