Reputation
256
Top tag
Next privilege 300 Rep.
Create new tags
Badges
1 2
Newest
 Yearling
Impact
~2k people reached

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Mar
24
comment Redirecting/grep'ing an existing shell's STDOUT
You're welcome! Glad you got it to work.
Jun
2
comment Precedence of stdin and stdout redirection in Bash
@dpacmittal The first example, ls > foo 2>&1, operates like this: first, standard output is redirected to foo, then, standard error is redirected to standard output, which is now the file foo. The second example, ls 2>&1 > foo, operates like this: standard error is redirected to standard output before standard output is redirected to foo, so standard error is echoed locally instead of being directed to the file.
Jun
2
comment Precedence of stdin and stdout redirection in Bash
@fpmurphy bash is generally POSIX compliant, except in the situations outlined here, where the default bash behavior differs. To make bash conform more, you can use the --posix option.