bug-bash
[Top][All Lists]
Advanced

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

Re: push cannot be redirected in 4.1.5


From: Viktor Szépe
Subject: Re: push cannot be redirected in 4.1.5
Date: Wed, 30 Apr 2014 13:14:45 -0700 (PDT)
User-agent: G2/1.0

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

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