# cat¶

concatenation

Reads the standard input (default) or argument files and rewrites them to the standard output.

Note:

• In the case of the standard input, the end-of-file marking is Ctrl-D

• In many commands, standard input and/or standard output can be called -.

cat
cat f
cat f1 f2
cat f1 | cat - | cat > f2


In addition to the redirections >, <, et >> already seen, cat accepts the option << STRING: the standard input will be read until it encounters the string STRING. This avoids the use of Ctrl-D.

cat > f2 << END
Bonjour
VOici un fichier
END