You are viewing a single comment's thread from:

RE: Bash Script Examples (Directory Navigation)

in #bash7 years ago

I did not know about the subshell. Seems useful, will have to try it out!

Push/pop I also know about but haven't gotten into the habit of using though I do occasionally.

Sort:  

I was actually considering a more in-depth explanation of sub shells would be a good topic for another post. Because along with () there is also $() and `` and <() and stuff | otherstuff that all end up invoking sub shells... and while I'm at it, here-docs might fit in there, too, as you can do stuff like bash << EOF bash <<< stuff...

I almost always forgot to popd after I pushd... I generally end up cd -ing...

Same same. I definitely use $() a lot.

Have you gone over piping in one of your posts yet? Somehow I was just reminded of it and it's one of the most common things I use for scripting tasks. Must be must be...

I've referenced it a little bit when talking about while loops, but I haven't devoted much attention to it. I think between subshells and piping I've more than enough to fill another article.

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.032
BTC 61362.14
ETH 2643.36
USDT 1.00
SBD 2.58