Skip to main content
added 299 characters in body
Source Link
miken32
  • 42.6k
  • 16
  • 119
  • 164

The author is saying that &>word and >&word are both the same, and both equivalent to >word 2>&1. In addition, the first form is preferred, though no reason is given for this...

The immediately following text in the manual says why:

When using the second form, word may not expand to a number or ‘-’. If it does, other redirection operators apply (see Duplicating File Descriptors below) for compatibility reasons.

The author is saying that &>word and >&word are both the same, and both equivalent to >word 2>&1. In addition, the first form is preferred, though no reason is given for this...

The author is saying that &>word and >&word are both the same, and both equivalent to >word 2>&1. In addition, the first form is preferred.

The immediately following text in the manual says why:

When using the second form, word may not expand to a number or ‘-’. If it does, other redirection operators apply (see Duplicating File Descriptors below) for compatibility reasons.

Source Link
miken32
  • 42.6k
  • 16
  • 119
  • 164

The author is saying that &>word and >&word are both the same, and both equivalent to >word 2>&1. In addition, the first form is preferred, though no reason is given for this...