hi,
Iam in directory A. I run a script from there. inside the script i have a command cd B.
When i come out of the script directory is A only.
Even when i come out scrip i want the directory to be B
How to achieve
hi,
Iam in directory A. I run a script from there. inside the script i have a command cd B.
When i come out of the script directory is A only.
Even when i come out scrip i want the directory to be B
How to achieve
run the script as
. ./script.sh
$cat x.sh
cd abc
$pwd
/home/bhargav/scripts
$. ./x.sh
$pwd
/home/bhargav/scripts/abc