CAT Command
CAT : Commands
Displaying the lines numbers of each line in a file.
cat -n <file_name> -- this will display customer data.
creating a file using cat
Creating a file
cat > file_name.txt
--copy paste the contents of the file here.
and control + c to come out and the file is created
Merge multiple file and create a new file
cat <file_name_1> <file_name_2 > new_file.txt
Copy content of a file into a new file in append mode
cat <file_name_1> <file_name_2> >> newfileappended.txt
showing the file in reverse order - command is reverse of "cat" > "tac"
Line numbers in front of each line .
cat -n <file_name>
Skip blank lines from a file use -b flag
cat -n -b <file_name>
check a file in reverse order
tac <file_name>
Comments
Post a Comment