5 replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
source | link

Possible Duplicate:
Order of redirectionsOrder of redirections

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

Possible Duplicate:
Order of redirections

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

Possible Duplicate:
Order of redirections

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

4 insert duplicate link
source | link

Possible Duplicate:
Order of redirections

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

Possible Duplicate:
Order of redirections

Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands:

  1. echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2
  2. echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort
  3. 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort

If the above commands were equivalent which is the preferred variant?

    Post Closed as "exact duplicate" by Mikel, Renan, jw013, Chris Down, Mat of
3 edited tags
| link
2 deleted 45 characters in body
source | link
1
source | link