[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push cannot be redirected in 4.1.5

From: Greg Wooledge
Subject: Re: push cannot be redirected in 4.1.5
Date: Wed, 30 Apr 2014 13:51:25 -0400
User-agent: Mutt/

On Wed, Apr 30, 2014 at 07:27:27AM -0700, Viktor Szépe wrote:
> address@hidden:/var/www:16:26:19:593] pushd zsolt-nezzan | cut -d' ' -f1
> /var/www/zsolt-nezzan

pushd needs to operate on the current shell, rather than in a child
process.  When you use a pipeline, as you did here, each command in the
pipeline runs in a separate child process ("subshell").

A useful approach for your problem (if I'm guessing it correctly) may be
to send the output of pushd to /dev/null and then look at the $PWD
variable afterward, to see where you are.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]