The awk command performs pattern matching on files. It is based on the AWK programming language. The awk keyword is followed by the pattern, the action to be performed, and the file name. The action to be performed is given within curly braces. The pattern and the action to be performed should be specified within […]
Archives for October 2022
grep: command not found
The grep command, in its most basic form, is a search tool. Unlike find or locate, it is not limited to finding file names; it is most often used to search the contents of a file for a particular string of text. As output, grep displays each full line of the file that your search […]
diff Command Examples in Linux
The diff command is used to compare text files. The command displays the two files and the differences between them. Using various symbols, the output suggests how you can change one file to make it identical to the other. Each symbol has a special meaning. The less than symbol (
diff: command not found
The diff command is used to compare text files. The command displays the two files and the differences between them. Using various symbols, the output suggests how you can change one file to make it identical to the other. Each symbol has a special meaning. The less than symbol (
paste Command Examples in Linux
The paste command is used to merge lines from text files horizontally. Each line of an initial file is a row in the first column; using paste, you specify a second file, and every line of the second file becomes a row in a new, second column. By default, the paste command uses a tab […]
paste: command not found
The paste command is used to merge lines from text files horizontally. Each line of an initial file is a row in the first column; using paste, you specify a second file, and every line of the second file becomes a row in a new, second column. By default, the paste command uses a tab […]
cut Command Examples in Linux
The cut command extracts the specified lines of text from a file. Common cut command options and their uses are given in the following table. Option Description -c Specify the number of the character to cut from each line. -d{delimiter} Separate one field from another. -f{field numbers} Specify the field numbers to cut on as […]
cut: command not found
The cut command extracts the specified lines of text from a file. Common cut command options and their uses are given in the following table. Option Description -c Specify the number of the character to cut from each line. -d{delimiter} Separate one field from another. -f{field numbers} Specify the field numbers to cut on as […]
sort Command Examples in Linux
The sort command is used to sort the lines of a text file in ascending or descending order, or sort as per a specified key. The sort command arranges the lines in a file. Common sort command options are provided in the table. Option Description -k{column numbers} Specify field values. For example, -k2 indicates the […]
sort: command not found
The sort command is used to sort the lines of a text file in ascending or descending order, or sort as per a specified key. The sort command arranges the lines in a file. Common sort command options are provided in the table. Option Description -k{column numbers} Specify field values. For example, -k2 indicates the […]