public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT:  Bash question
@ 2007-09-20  8:47 Anthony E. Caudel
  2007-09-20  9:05 ` Dirk Heinrichs
  2007-09-20 15:31 ` Frank Gruellich
  0 siblings, 2 replies; 4+ messages in thread
From: Anthony E. Caudel @ 2007-09-20  8:47 UTC (permalink / raw
  To: Gentoo Mailing List

Is there any way to make "pushd" and "popd" (Bash built-ins) silent?  As
it is, when the execute, the directory is echoed to the output, making
it difficult to use the commands in a script.  For example:

OLD_VER=$(pushd /boot; ls kernel-* | sort | head -1; popd)
echo $OLD_VER
/boot ~ kernel-2.6.22-gentoo-r2 ~

The /boot and the tildes are returned by pushd and popd and mess up the
script.

There doesn't seem to be any options to turn off the echo off and shopt
has nothing in it.

Tony

-- 
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-21  8:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-20  8:47 [gentoo-user] OT: Bash question Anthony E. Caudel
2007-09-20  9:05 ` Dirk Heinrichs
2007-09-20 15:31 ` Frank Gruellich
2007-09-21  8:19   ` Anthony E. Caudel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox