Cat

Cat is part of Gnu Coreutils, made to Concatenate and write files.

Inputs

There is 2 main way to feed inputs in cat:

File

cat file

Pipe

echo "This is test" | cat

Options

Create a file

Will take data from standard input. (CTRL-D to quit)

cat > file

Append a file

cat >> file

Concatenate

cat file1 file2 > file1_2

The "-" is standard input, which will allow you to add the data you want. (CTRL-D to quit)

cat file1 - file2 > file1_2

Tac

cat in reverse, will reed line from bottom up

tac file

Numbered line

cat -n file

Numbered line with info

cat -b file

Squeeze blank

Will squeeze repeated blank line into one.

cat -s file

Highlight end of line

cat -E file

Highlight tab

cat -T file