3
votes
Accepted
Advanced argument escaping with find + xargs and nested commands
Analysis
The problem arises because you pass the pathname (from the expansion of {}) inside the shell code your sh -c gets. sh is not aware {} was there, it gets the argument with {} already expanded (...
1
vote
Accepted
How to redirect the standard output to file without buffering?
The program itself must be changed to not buffer – or to flush the buffered data more often.
Run python with the -u option,
or use sys.stdout.reconfigure(line_buffering=True),
or call print(..., ...
1
vote
In Windows Terminal, how do I add bash as one of the shell options?
Using the git for windows installer you get the option to let the installer do this for you.
1
vote
Display all output but highlight search matches
Instead of -e '^' which does not work with -F (--fixed-strings), it seems that -e '' just works. It matches every empty string, but it doesn't seem to trigger the color output.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bash × 11856linux × 4992
command-line × 1635
shell × 1581
terminal × 1013
macos × 1009
ubuntu × 754
ssh × 684
unix × 618
bash-scripting × 567
script × 522
shell-script × 511
sed × 367
zsh × 321
windows × 307
grep × 302
cygwin × 266
git × 263
find × 248
windows-subsystem-for-linux × 235
mac × 221
windows-10 × 219
awk × 218
environment-variables × 211
cron × 197