DEV Community

Discussion on: Monitor the performance of any command line program with this single command

Collapse
 
agrim profile image
Agrim Prasad

Thanks for the tip Thomas. I usually do use $() but didn't know that you don't need to escape nested command execution with it. Initially I used $() along with {} and it lead to errors on Mac (but not on Linux), so I switched to back-ticks which worked on both.

I'll update the article once I get near my computer and can test this out on both Mac and Linux, thanks again.

Collapse
 
ferricoxide profile image
Thomas H Jones II

Yeah... Being a long-time abuser of nested subshells, used to frustrate the hell out of me once I had to go more than about two subshells deep ...Sooner if one or more of those subshells required single- and/or double-quotes for some of their functionality.

Wasn't really until I started adding shellcheck to my TravisCi recipes that I habituated to the $() method. That tool also caused me to start moving off a few other habitual things that had been placed on the deprecation (but had worked for decades so were just "finger memory").