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.