89,451 reputation
12102216
bio website
location European Union
age
visits member for 2 years, 2 months
seen 4 hours ago

8h
awarded  Good Answer
10h
comment Simultaneously calculate multiple digests (md5, sha256)?
AFAICS, it only works in zsh. In ksh93 and bash, the output of sha256sum goes to md5sum. You'll want: { tee < "$file" >(sha256sum >&3) | md5sum; } 3>&1. See unix.stackexchange.com/q/153896/22565 for the reverse problem.
10h
revised Copy stdout and stderr to a log file and leave them on the console within the script itself
edited body
10h
comment Is >&- more efficient than >/dev/null?
@jamadagni, see unix.stackexchange.com/search?q=user%3A22565+%223%3E%26-%22 for some examples
13h
awarded  Nice Answer
15h
revised Is >&- more efficient than >/dev/null?
added 25 characters in body
15h
comment Difference between 2>&-, 2>/dev/null, |&, &>/dev/null and >/dev/null 2>&1
&> was in bash from the start (and breaks Bourne and POSIX compatibility as it means something different there, though is unlikely to be hit). >& and |& come from (t)csh (and it's their only way to redirect stderr). They were in zsh from the start and have only been added recently to bash. See also rc for better designed operators.
15h
comment Is >&- more efficient than >/dev/null?
@terdon, that error is by tee and you're using GNU tee. Try with busybox tee as I said.
15h
answered Is >&- more efficient than >/dev/null?
1d
comment Why is ImageMagick's `compare` command so slow and is there an alternative?
Isn't it what motion is for?
Oct
21
revised What does '>/dev/null 2>&1' mean in this article of crontab basics?
added 11 characters in body
Oct
20
awarded  Good Answer
Oct
19
revised When was the shellshock (CVE-2014-6271/7169) bug introduced, and what is the patch that fully fixes it?
deleted 82 characters in body
Oct
15
comment Empty a file without grep subsequently treating it like a binary file
Best would be to use tee -a. See there for details (tee -a is the equivalent of shells using >>).
Oct
15
revised sed lines after match and before next match
added 252 characters in body
Oct
15
answered sed lines after match and before next match
Oct
15
revised sed lines after match and before next match
added 24 characters in body
Oct
15
revised (SOLVED) How I get the current working directory with inverted slash?
fixed attribution, remove usage of the split+glob operator which is not needed here (and potentially harmful). Remove usage of echo.
Oct
14
revised Remove all files created before a certain date
added 185 characters in body
Oct
13
answered View physical location of a file/directory on a hard disk