C shell (e.g. csh
, tcsh
) and Bourne shell (e.g. sh
, bash
) are two shell families. These two have differences in syntaxes and implementation of various operations.
The examples you have shown are how these two family handle redirection of file descriptors. Both commands are redirecting STDERR (file descriptor 2) to STDOUT (file descriptor 1), sending STDOUT to the file config.out
, so all the STDOUT and STDERR are being redirected to the file. And also sending the command to background by &
at the end.
Historically, C shell uses >&
to redirect both STDOUT and STDERR at once while Bourne shell uses two redirections to do so, at first sending STDOUT to the file and then sending STDERR to the place STDOUT is going i.e. the file.
Note that, the above discussion is true for all C shell an Bourne shell family of shells for the sake of portability. But now a days many things have changed and these type of things are modified for the sake of efficiency in newer implementations of various shells e.g in bash
(or zsh
/ksh
) which has inherited from Bourne shell, you can do the above with &>
:
./configure &> config.out &
As you can see it is actually the reverse of csh
syntax, >&
.