4 ms·
The big missing bashism in the list is the use of &> or >& to redirect both standard output and standard error. In a POSIX conforming shell, &> word is t
by kps 10y ago
The big missing bashism in the list is the use of &> or >& to redirect both standard output and standard error.
In a POSIX conforming shell,
&> word
is the same as
& > word
since '&>' is not a distinct token; it puts the command in the background and redirects standard output.
The more commonly seen >& will bite you even in bash. What does this do?
>& $FILENAME
Answer: in bash, it depends on the spelling of the file name.
Note that bash accepts both even in its so-called ‘POSIX compatible’ mode.