1 |
On Wednesday 23 August 2006 23:23, lnxg33k wrote: |
2 |
> Mike Frysinger wrote: |
3 |
> > use this instead ... makes for cleaner output: |
4 |
> > pushd "${BUILDDIR}" > /dev/null |
5 |
> |
6 |
> Would `cd foo` and `cd -` work just as well in place of `pushd` and `popd`? |
7 |
> Recent tip I ran across and wondering if it holds up across the board. |
8 |
|
9 |
'cd -' is generally for interactive shells, pushd/popd is for scripts |
10 |
|
11 |
plus, while `cd -` is a stack of depth 1, pushd/popd has an infinite stack ... |
12 |
so you dont have to worry about recursive calls being wrong |
13 |
-mike |