public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony E. Caudel" <tony.caudel@sbcglobal.net>
To: Gentoo Mailing List <gentoo-user@lists.gentoo.org>
Subject: [gentoo-user] OT:  Bash question
Date: Thu, 20 Sep 2007 03:47:17 -0500	[thread overview]
Message-ID: <46F23395.7030305@sbcglobal.net> (raw)

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



             reply	other threads:[~2007-09-20  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-20  8:47 Anthony E. Caudel [this message]
2007-09-20  9:05 ` [gentoo-user] OT: Bash question Dirk Heinrichs
2007-09-20 15:31 ` Frank Gruellich
2007-09-21  8:19   ` Anthony E. Caudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46F23395.7030305@sbcglobal.net \
    --to=tony.caudel@sbcglobal.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox