Matt Schalit wrote:
> 
> David Douthitt wrote:
> [snip]
> 
> Ok.  I get it.  As an aside,
> 
> > $(ipmask -c $IPADDR)
> 
> Is that notation Bourne Shell?  Or is
> that something else?

Korn Shell.

> I realize it looks like
> you're asking for a subshell to be spawned,
> then the ipmask command to be evaluated, and
> the result returned, but why not
> 
>   `ipmask -c $IPADDR`

It's the same thing.  However, with the Korn Shell you could do
something like this:

$(ipmask -c $(ifconfig eth0 | grep "172.16"))

...nested commands...

> I don't want to get into learning ksh or something
> else if it's not Bourne at this time.

ksh is compatable but extends Bourne shell in FANTASTIC ways - command
line editing; variable pattern matching and substitution (extending the
${VAR:-XXX} type syntax); nested commands; command history; enhanced cd;
job control; command aliases; array variables; tilde expansion.

Much of what LRP uses is ksh-style code, as ash and bash support most of
ksh.  However, I prefer to go with the real thing and use pdksh (except
for ash and LRP).

Back when I used csh as my prefered interactive shell, I used ksh for
writing all my scripts - instead of sh or csh.  Now I use ksh
exclusively.

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to