On Thu, Jul 20, 2000 at 11:29:50PM +1000, Michael Khachiki wrote:
> HI all
> 
> can any one tell me what is the difference between Unix and Linux scripts? I
> have made small Unix script and it works... but the same script wouldn't
> work on Linux. I am perplexed on why would the same script work on one OS
> and not on the other.

I'd bet that this is because of differences in the shell.  Most/some
commercial unixes use the plain old bourne shell, whereas most of the Linux
distributions ship with the bash (bourne again shell).  Because the bourne
shell isn't available (or is it?) for Linux, I'd suggest to either install
bash on the Unixes at work, or only write shell scripts that use a shell
(like tcsh, ksh or whatever) which is available for both kinds of OS.

And even if the shell isn't the culprit, there are many other tools which
may behave slightly differently.  E.g. the GNU find prints the results by
default, whereas a non-GNU find may not print unless you specify -print.

> Can any one tell me if /bin is the right place to store scripts?

Depends on what you mean by "right".  Sure, /bin is always in the PATH, but
I always store my self written scripts in /usr/local/scripts and add this to
the system wide PATH.  Or if the script is just for a user, I'll store it in
$HOME/bin.

Alexander Skwar
-- 
Homepage:       http://www.digitalprojects.com
Sichere Mail?   Mail an [EMAIL PROTECTED] fuer GnuPG Keys
ICQ:            7328191

Reply via email to