4 ms·
Not sure if that's what you wanna do but you could do : "ls /usr/local/Cellar/ | cat >> myInstall.txt"
by StyloBill 10y ago
Not sure if that's what you wanna do but you could do :
"ls /usr/local/Cellar/ | cat >> myInstall.txt"
- sigjuice 10y agoWhy not "ls /usr/local/Cellar >> myInstall.txt" ?
- StyloBill 10y agoI use cat out of habit but yep, you're absolutely correct.
- Keyframe 10y agoI just do this for now: cat <(echo brew install) <(brew list) | sed ':a;N;$!ba;s/\n/ /g' > brew_install.txt It lists directly from brew, prepends brew install and then replaces all newlines with a space and outputs to brew_install.txt
- jfb 10y agoI use brew leaves instead of brew list for this sort of thing; as I usually don't care about the constituent transitive dependencies, only the final results.