dynamic cd shell linux

0

I need to run a shell that makes a dynamic cd. This in order to work on several servers does not matter your folder settings. The idea is to do something like this:

var=$(pwd)

cd $var 

in the folder where the sh is there is a file that I need to read, but it always throws a "No such file or directy", any suggestions ?. Thanks.

    
asked by ROBY HERNAN RUBIANO 30.08.2018 в 18:55
source

1 answer

0

With bash it works like this:

var=$PWD 
cd $var
    
answered by 03.09.2018 в 15:40