Thursday, February 4, 2021

All cat command in Linux/Unix

 

Linux cat command.

cat  command is used to display the content of text files and to combine several files to one file.
The cat command does not accept directories.

cat command syntax

$ cat [optionsfile1 [file2...]

cat command options

cat command main options:
optiondescription
cat -badd line numbers to non blank lines
cat -nadd line numbers to all lines
cat -ssqueeze blank lines to one line
cat -Eshow $ at the end of line
cat -Tshow ^I instead of tabs

cat command examples

View text file data:
$ cat list1.txt
milk
bread
apples

$ cat list2.txt
house
car

$

Combine 2 text files:
$ cat list1.txt list2.txt
milk
bread
apples

house
car

$

Combine 2 text files to another file:
$ cat list1.txt list2.txt > todo.txt
$

No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...