(Fwd) Re:Bash Programming

Paul King pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org
Thu Aug 19 01:16:39 UTC 2004


------- Forwarded message follows -------
From:           	Paul King <pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org>
To:             	Devin Whalen <devin-Gq53QDLGkWIleAitJ8REmdBPR1lH4CV8 at public.gmane.org>
Subject:        	Re: [TLUG]: Bash Programming
Send reply to:  	pking123-rieW9WUcm8FFJ04o6PK0Fg at public.gmane.org
Date sent:      	Wed, 18 Aug 2004 21:15:19 -0400

> > Bash-2.05b supports array, as evidenced by Linux box.  Your scripts runs
> > okey here on 2.05b and 3.0.
> 
> Ok...I ran it with ./file.sh and it worked fine!!  What is the
> difference between ./ and sh?  I don't want to make the same mistake
> again.

sh script.sh
runs the script as though the line 
   #! /bin/sh
were inserted at the beginning of the script.

./script.sh
runs the script as if it has execute privelages and the line
   #! /bin/sh
is inserted at the beginning of the script. In fact, script.sh should have
execute privelages if it to be run this way.

> 
> When things like this happen I begin to realize how little I know about
> computers :).
> 
> Thanks for the help.
> 
> 
> 
> 
> -- 
> Devin Whalen
> Programmer
> Synaptic Vision Inc
> Phone-(416) 539-0801
> Fax- (416) 539-8280
> 1179A King St. West
> Toronto, Ontario
> Suite 309 M6K 3C5
> Home-(416) 653-3982
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml


------- End of forwarded message -------
=========================================================
Paul King              http://www3.sympatico.ca/pking123/


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list