tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Shell Command Substitution and fork()



> so why don't you use PDKSH (/bin/ksh) or pkgsrc's ast-ksh instead of ash
> (/bin/sh) ?  Even pkgsrc's GNU Bash would do.
Err, what?
pdksh performs worse that ash. bash surely performs worse. Both fork.

Overall, I don't write for a specific shell, I write for POSIX shells.
While that particular script (part of a much lager system) performs best 
with ksh93, other parts may perform best with another shell. I won't switch 
shells from component to component.

> I do x=`command` which is almost the same as $(command), using any KSH or
> BASH as interpreter.
Backticks are POSIX, too. A shell that will fork with $(...) will certainly 
fork with `...`, too.

> I don't really care about POSIX here as KSH and BASH syntax is much more 
> powerful.
It's fine if you don't care about POSIX.


Home | Main Index | Thread Index | Old Index