On 10/08/14 17:15, Reco wrote:
> Hi.
>
> On Sun, 10 Aug 2014 17:03:20 +0200
> Tony van der Hoff wrote:
>
>> DEBUG=1
>> if [ $DEBUG -eq 0 ]; then
>> NULLOUT='>/dev/null'
>> fi
>> pushd $dir ${NULLOUT}; do_something; popd ${NULLOUT}
>>
>
> Try it like this:
>
> #DEBUG=1
> OUT=/dev/null
> [
The Wanderer wrote:
> Bob Proulx wrote:
> > If you don't need CDPATH then try unsetting it.
>
> Is CDPATH used at all by pushd / popd? I don't see any indication of
> that in bash(1), but since cd itself isn't involved here AFAICT,
> bringing up CDPATH wouldn't seem to make sense otherwise.
Well
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 08/10/2014 01:20 PM, Bob Proulx wrote:
> Tony van der Hoff wrote:
>
>> Unfortunately the pushd/popd generate a lot of (mostly) unwanted
>> output, with no apparent way of suppressing it.
>
> Do you have CDPATH set? If CDPATH is set then there
Tony van der Hoff wrote:
> Unfortunately the pushd/popd generate a lot of (mostly) unwanted output,
> with no apparent way of suppressing it.
Do you have CDPATH set? If CDPATH is set then there is ambiguity over
where the cd actually went since it may be one of the CDPATH
components. If so the s
Hi.
On Sun, 10 Aug 2014 17:03:20 +0200
Tony van der Hoff wrote:
> DEBUG=1
> if [ $DEBUG -eq 0 ]; then
> NULLOUT='>/dev/null'
> fi
> pushd $dir ${NULLOUT}; do_something; popd ${NULLOUT}
>
Try it like this:
#DEBUG=1
OUT=/dev/null
[ -z "$DEBUG" ] && OUT=/dev/stdout
pushd $dir > $OUT; do_
5 matches
Mail list logo