4 ms·
echo foo | cd / cd / | echo foo In bash, only the second line will change your working directory. Um... in Bash, neither of those change yo
by LukeShu 12y ago
echo foo | cd /
cd / | echo foo
In bash, only the second line will change your working
directory.
Um... in Bash, neither of those change your working directory (unless `shopt -s lastpipe` is set, in which case: the first does).
- ridiculous_fish 12y agoWhoops, you're right! Egg on my face.