On Wednesday 23 August 2006 23:23, lnxg33k wrote:
> Mike Frysinger wrote:
> > use this instead ... makes for cleaner output:
> > pushd "${BUILDDIR}" > /dev/null
>
> Would `cd foo` and `cd -` work just as well in place of `pushd` and `popd`?
> Recent tip I ran across and wondering if it holds up across the board.

'cd -' is generally for interactive shells, pushd/popd is for scripts

plus, while `cd -` is a stack of depth 1, pushd/popd has an infinite stack ... 
so you dont have to worry about recursive calls being wrong
-mike

Attachment: pgpqpH7BzVRWH.pgp
Description: PGP signature

Reply via email to