TRÄW🤟
TRÄW🤟

@thatstraw

4 Tweets 1 reads Dec 10, 2022
@stormzy_22 I guess you have tried to create a script like this and it didn't work:
@stormzy_22 That's a common behaviour. The script is run in a subshell and cannot change the working directory of the parent shell. When it finishes, its effects are lost.
@stormzy_22 So to change the current shell's directory permanently you should use the source command, also aliased simply as '.', which runs a script in the current shell environment instead of a sub shell.
source ./script.sh
or
. ./script.sh
@stormzy_22 you can explore other options here:
unix.stackexchange.com

Loading suggestions...