Can I combined multiple .out files with the cat command in bash or csh? Additionally I want only the header of first file to be concatenated and I was thinking of using the tail function for that. Anyone know if this is possible or of a way to do this?
To concatenate files
cat file1 file2 file3 > output
To get the first N lines of a file
head -n N file
To get the first N lines of
file1 and then concatenate all the other files
head -n N file | cat - file1 file2 file3 > output
Cat will read standard input from the piped command (
- argument) and concatenate it with the specified files.