[X-Unix] A little shell scripting help

Larry Helms lhelms at sonic.net
Wed Oct 5 03:14:32 PDT 2005


Ok... So I hope this whole discussion of shells, syntax, etc... Has helped
the original poster...

>> Another EXCELLENT resource for shell scripting newbies...
>> 
>>     http://www.shelldorado.com
>> 
>> Contains tutorials... And a WHOLE BUNCH of exmaples.
> 
> I like this site a lot.
> 
> Advanced Bash-Scripting Guide by Medel Cooper at <http://www.tldp.org/
> LDP/abs/html/> also appears to be very good.

Excellent.  I'll give this as an additional reference to others at work -
who're always asking me about scripting.

>> Depending on the shell the (...) construct usually means execute
>> contents
>> INLINE.  E.g.
>> 
> 
> I'm not sure where you got this inline concept from. All my shell
> books and the web pages I checked say that (...) invokes a subshell,
> i.e. it explicitly forks a new process with a local environment that
> exists till the closing ')'. The point is to be able to set up a new
> temporary environment for just these commands or to be able to run
> commands in parallel. The classic example is using tar piped to tar
> to copy something from one place to another, e.g. tar cf - stuff |
> (cd /some/where/else; tar xf -). This wouldn't work if (...) didn't
> invoke a new process.

Yes... My choice of the word INLINE wasn't accurate.  This is a better more
accurate description.




More information about the X-Unix mailing list