2014. április 30., szerda 19:51:25 UTC+2 időpontban Greg Wooledge a következőt 
írta:
> On Wed, Apr 30, 2014 at 07:27:27AM -0700, Viktor Sz�pe wrote:
> 
> > [root@szerver:/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.

Oh! THank you.
I was aware of the the subshell problem.
But I thought only cut will run in a subshell.

Reply via email to