|
|
|
|
|
by rgrau
1907 days ago
|
|
For fast iteration with pipes, using only basic unix tools, and arguably less risky to fat-fingering, I write it in a file, and use watch -n1. Easy to modify, temporarily comment parts of it, etc... Also, I wrote this plog function (for pipe-log, or something): plog() {
local msg=${1:-plog}
tee >(sed -e "s/^/[$msg] /" | cat 1>&2 )
}
That allows me to see what's happening in the middle steps of the pipeline.I ended up compiling a list of tricks like that in https://raimonster.com/scripting-field-guide/ , in case anyone is interested (and feedback is appreciated) |
|
Learned several new bashisms which i will put into my computer tip memorization deck. Thank you for writing.