3,337 reputation
418
bio website
location
age
visits member for 2 years, 5 months
seen 7 hours ago

Oct
15
revised Use bash's read builtin without a while loop
added 52 characters in body
Oct
15
revised Use bash's read builtin without a while loop
Added conclusion
Oct
15
comment Use bash's read builtin without a while loop
My problem was that I thought bash would put everything between the pipe symbol and the end of the line into the same subshell, but apparently it only reads the next statement.
Oct
15
comment Use bash's read builtin without a while loop
I think I got it: The actual point is that WHEN USING PIPES, bash creates subshells for each processes of the pipeline, and due to scoping the variables are gone, after the pipeline. Using {} makes the remainder of the line an (one!) element of the pipeline, while inside that subshell the variables are available. Using process substitution one is not using pipes and therefore bash does not spawn subshells.
Oct
15
accepted Use bash's read builtin without a while loop
Oct
15
comment Use bash's read builtin without a while loop
{} ... I only tried (). Why does the ; in your second example not start "a new set of commands"? Actually I don't understand the < < construct at all. Need to think ...
Oct
15
asked Use bash's read builtin without a while loop
Oct
10
reviewed Approve suggested edit on How to disable USB autosuspend on kernel 3.7.10 or above?
Oct
2
reviewed Approve suggested edit on Search for variable in OpenOffice/LibreOffice
Oct
2
reviewed Approve suggested edit on loadkeys has (almost) no effect
Sep
30
awarded  Explainer
Sep
30
asked Use HDMI for audio ouput only
Sep
24
comment Using per-user keyboard XKBOPTIONS for all desktop environments
What happend to ${HOME}/.xsessionrc? I'm using Ubuntu 14.04 and it still honors it ...
Sep
24
comment “abbreviation” for dd$ if current line is empty
I don't know what configurations you guys are using, but using the actual vim (vi improved), in insert mode the backspace key performs exactly as in "other editors". Or am I missing something?
Sep
24
comment Is iptables -p proto -m proto redundant?
IIRC it is a relatively new feature that iptables guesses which modules it has to load, in order to get certain functionality. TCP at least used to be a module that one could choose to load or not. So -m tcp -p tcp would be the most portable version of TCP rules
Sep
24
comment Accidentally deleted /dev/tty, how to bring it back on debian7?
5. It would really surprise me if it wasn't.
Sep
24
reviewed Leave Open Send/Receive bandwidth monitor per application?
Sep
24
reviewed Close How to migrate MySQL and Apache data & settings, if a machine is not working but I can mount the old drive on a new one?
Sep
24
reviewed Close If I use one of the exec family functions to open a child process, will pipes to parent be applied to the child?
Sep
24
reviewed Reject suggested edit on How do I set my DNS on Ubuntu 14.04?