running a specified binary across reboots

Rick Stevens ricks at alldigital.com
Fri Aug 8 17:07:52 UTC 2014


On 08/08/2014 09:51 AM, Tim issued this missive:
> Allegedly, on or about 08 August 2014, Kevin Wilson sent:
>> Should it have #!/bin/bash as its first line ?
>
> My older Fedora install has #!/bin/sh as its first line in the rc.local
> file.  Not sure if it really is using a lighter weight shell (which
> sounds like a good idea), or one is aliased to the other, on my system.

/bin/sh is a symlink to /bin/bash. If bash is started as /bin/sh, then
it tries to mimic sh's startup mechanisms as close as possible while
remaining POSIX-compliant. Generally speaking, you can use them
interchangeably. The differences in operation are fairly minor (the
order in which some compound statements are evaluated for example),
although they can bite you on occasion.

Startup shell scripts were historically written in sh (a.k.a. Bourne
shell) since that was the only shell you were _guaranteed_ to have on a
Unix system (BSD- or SVR3/4-derived). csh and ksh were optional, csh
originally only being available on BSD-derived systems.

bash (Bourne Again shell) was written to enhance and work around some
shortcomings in the original Bourne shell and to move some of the more
commonly used commands inside the shell rather than having to call
external binaries.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks at alldigital.com -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-     "Daddy, why doesn't this magnet pick up this floppy disk?"     -
----------------------------------------------------------------------


More information about the users mailing list