cat
é o comando para fazer isso:
cat filename | pastebinit
De man cat
:
cat - concatena arquivos e imprime na saída padrão
-A, --show-all
equivalent to -vET
-b, --number-nonblank
number nonempty output lines
-e equivalent to -vE
-E, --show-ends
display $ at end of each line
-n, --number
number all output lines
-s, --squeeze-blank
suppress repeated empty output lines
-t equivalent to -vT
-T, --show-tabs
display TAB characters as ^I
-v, --show-nonprinting
use ^ and M- notation, except for LFD and TAB
With no FILE, or when FILE is -, read standard input.