Bash Programming
Taavi Burns
taavi-LbuTpDkqzNzXI80/IeQp7B2eb7JE58TQ at public.gmane.org
Wed Aug 18 21:24:05 UTC 2004
On Wed, Aug 18, 2004 at 05:12:40PM -0400, Devin Whalen wrote:
> 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.
>
> When things like this happen I begin to realize how little I know about
> computers :).
>
> Thanks for the help.
You may notice that /bin/sh and /bin/bash are in fact the same file on your
Linux box, but that they are NOT the same on the FreeBSD box. sh and bash are
not the same thing, though any legal sh script should execute just fine in bash
(by design). The reverse, as you've found, is not true. ;)
Linux:
-rwxr-xr-x 1 root root 730496 Feb 9 2004 /bin/bash
lrwxrwxrwx 1 root root 4 Feb 9 2004 /bin/sh -> bash
FreeBSD:
-rwxr-xr-x 1 root wheel 817300 Jan 19 2003 /usr/local/bin/bash
-r-xr-xr-x 1 root wheel 461252 May 31 19:44 /bin/sh
--
taa
/*eof*/
--
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