Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bhpnpmg
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
bhpnpmg
6y ago
## key step: out=$((set -o xtrace;: "$@") 2>&1) # xtrace option shows us quoting for our args ## Cleanup $out # only 1 of the next 4 'left trims' is expected to change $out: out=${out#++++
2.
▲
by
bhpnpmg
6y ago
I wrote bash function that leverages 'set -x' to get me the quoting in "$@" into a single bash env var say $job or in to a temp file. I use it from time to time -- pretty sure it's not perfect, but it works well en
3.
▲
by
bhpnpmg
7y ago
# My Shortlist of News sources ## websites: ## ### < https://projectcensored.org/> ### ### < https://consortiumnews.com> ### ### < https://www.truthdig.com/> ### ### < https:&#
4.
▲
by
bhpnpmg
14y ago
How about a script: a wrapper to run any other script or process, that logs both STDOUT and STDERR in one file, but prepends a short string of your choice for lines that are from STDERR.