4 ms·
Why would I want a shell script to change my $CWD after the shell script exits? Maybe you wanted a script that would use shortcuts to take you to cumbersome di
by spudlyo 14y ago
Why would I want a shell script to change my $CWD after the shell script exits?
Maybe you wanted a script that would use shortcuts to take you to cumbersome directory paths?
I enjoyed this article, even though some of it was review. I didn't know that anything in a pipeline got its own separate subshell in bash, and that different shells behaved differently in that regard. I'm always happy to learn interesting uses for process substitution, and got a kick out of:
read sum < <(echo "2+3" | bc)
Good stuff.
- dfc 14y agoFor cumbersome directory paths: $ tail -1 ~/.bash_aliases CMBRSM=/opt/var/dont-know-about-FHS/local/etc/cache/config $ cd $CMBRSM Unlike a shell script an alias allows you to: $ ls $CMBRSM/subdirectory $ cat $CMBRSM/file.txt