275 reputation
28
bio website
location Seattle, WA
age 30
visits member for 3 years, 2 months
seen 11 hours ago

11h
revised Pipes, how do data flow in a pipeline?
the right way to share the best answer is to accept it (as you have done), not to incorporate it into the question as a postscript.
15h
suggested approved edit on Pipes, how do data flow in a pipeline?
Jan
4
comment Why is using && 75 times faster than if…fi and how to make code clearer
Good to know; thank you!
Jan
4
comment Why is using && 75 times faster than if…fi and how to make code clearer
Sorry, but your reply seems to assume that I already have a detailed knowledge of shell support for (( ... )). I'm flattered, but I do not have that detailed knowledge. (Remember, I'm the one who just asked if (( ... )) is less portable.) So I really can't make sense of your reply. :-/ Could you be a bit more explicit?
Jan
4
comment Why is using && 75 times faster than if…fi and how to make code clearer
What's the advantage of [ "$((...))" -eq "$((...))" ] over (( (...) == (...) ))? Is the latter less portable?
Dec
18
awarded  Scholar
Dec
18
accepted How do I use null bytes in Bash?
Dec
18
revised How do I use null bytes in Bash?
rephrased a bit more honestly
Dec
13
awarded  Self-Learner
Dec
13
comment Is space not allowed in a filename?
@terdon: Since you never posted the question, I've taken the liberty of posting a self-answered one: unix.stackexchange.com/q/174016/12378. Please let me know if you have any feedback on it.
Dec
13
awarded  Student
Dec
13
asked How do I use null bytes in Bash?
Dec
13
answered How do I use null bytes in Bash?
Oct
26
comment Dash equivalent of self-redirection of script output
@mikeserv: Re: "it works in any shell": Not true. I tried your original example in Bash, Dash, and Zsh, and it worked only in Dash. (N.B. This was on Cygwin, which is what I had handiest. I can check more typical environments, namely Ubuntu and RHEL5, if desired.) Also, echo ... | tee -a /dev/fd/0 didn't work in any of the three (tee: /dev/fd/0: Permission denied), but that doesn't surprise me; I'm guessing you really meant echo ... | tee -a /dev/fd/1, which worked in all of them.
Oct
26
comment Dash equivalent of self-redirection of script output
@mikeserv: Not just heredocs, but also /dev/fd/3 (in that precise form), and the details of what happens to whitespace . . . and for that matter, the fact that this whole approach works at all in Dash, when it doesn't work in other shells that have all of the components, means that the overall approach is a special rule to remember. (This reminds me of attempts to create a simplified English with less vocabulary; they cut out words like persist, but they ignore just-as-difficult idioms like keep on.)
Oct
25
comment Dash equivalent of self-redirection of script output
@mikeserv: It involves plenty of rules to remember; perhaps you have simply grown so used to them that you don't notice.
Oct
25
comment Dash equivalent of self-redirection of script output
@mikeserv: In what sense is cat /dev/fd/3 3<<HEREDOC\n$(get output)\nHEREDOC\n "easier" than cat <(get output)?
Aug
4
comment Is space not allowed in a filename?
@terdon: That's not really true. $'\0' is equivalent to '' -- and (for example) $'foo\0bar' is equivalent to foo. You may prefer to write $'\0' instead of '' when the notation better matches the semantics you have in mind, but don't let it deceive you.
Jun
16
awarded  Caucus
Jun
16
awarded  Constituent