Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2003 10:39:34 -0500
From:      Scott W <wegster@mindcore.net>
To:        Luke Kearney <lukek@meibin.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: a good way to save a keystroke?
Message-ID:  <3FBF8336.2020501@mindcore.net>
In-Reply-To: <20031123001254.152D.LUKEK@meibin.net>
References:  <3FBEC5C1.7040705@daleco.biz> <6.0.0.22.0.20031122093747.065f9420@pop.face2interface.com> <20031123001254.152D.LUKEK@meibin.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Luke Kearney wrote:

>On Sat, 22 Nov 2003 09:44:30 -0500
>Marty Landman <MLandman@face2interface.com> granted us these pearls of wisdom:
>
>  
>
>>At 09:11 PM 11/21/2003, Kevin D. Kinsey, DaleCo, S.P. wrote:
>>
>>    
>>
>>>Which shell are you using?
>>>      
>>>
>>C shell. Maybe I should switch to Bash? I mostly ssh in using my user acct 
>>and then have at least one screen session where I su to root. However to 
>>the extent that I'd like to write shell scripts that are consistent for 
>>account that may use different shells, if that even makes sense, than maybe 
>>backticks are the way to go.
>>
>>    
>>
>Just as an aside to this particular thread. I am sure I read somewhere
>that it is usually best to write scripts for sh , ie /bin/sh as many of
>the others are located in /usr/something which when the file system is
>not stable may or may not be accessible. man sh would be your friend
>here and quite often shell scripts that are run from cron are written
>with this shell in mind. 
>
>good luck
>
>LukeK
>  
>
This is generally true- if something works in sh, it _should_ also work 
in virtually any other shell....although in this case, the $(...) seems 
to be the exception.  I know there are some people that refuse to use 
anything other than csh/tcsh, but when it comes down to writing shell 
scripts going out to customers, or part of any software, you write for 
sh.....or if Linux only, for bash.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FBF8336.2020501>