* Anthony E. Caudel <[EMAIL PROTECTED]> 20. Sep 07:
> Is there any way to make "pushd" and "popd" (Bash built-ins) silent?
> [snip] For example:
> 
> OLD_VER=$(pushd /boot; ls kernel-* | sort | head -1; popd)
> echo $OLD_VER
> /boot ~ kernel-2.6.22-gentoo-r2 ~

For that exact example... why you bother at all?  $( ) opens a subshell
and cd's in subshells don't interact with parent shell so you could
simply write:

 OLD_VER=$(cd /boot; ls kernel-* | sort | head -1)

or

 OLD_VER=`cd /boot; ls kernel-* | sort | head -1`

if you want to be more compatible.  Or am I missing a point?

HTH, kind regards,
 Frank.
-- 
Sigmentation fault
-- 
[EMAIL PROTECTED] mailing list

Reply via email to