Different methods
The different ways in UNIX, one of the popular article series of The UNIX School:
- How to find the length of a string or variable?.
- How to print or display only the lines in a file which are not empty.?
- How to split the PATH variable.?
- How to get the total line count of a file?
- How to do arithmetic operations in Linux.?
- How to list the file without ls command.?
- How to rename a group of files?
- How to remove or delete the Control-M characters in a file?
- How to add the first line and last line to a file.?
- How to number the file contents?
- How to dump the hex contents of a file?
- How to join or concatenate all lines in a file?
- How to find the sum of all the numbers in file?
- How to split the file contents?
- How to display the contents in a file?
- How to capitalize the contents in a file?
- How to retrieve the file name from absolute path?
- How to print the first line or the header of the file?
- How to zero pad a number or a variable?
- How to print the first few characters of a file?
- How to print the next few lines after pattern match?
- How to reverse a string in Linux?
- How to print the last line or the trailer of a file?
- How to right pad a number or a string?
- How to swap every 2 lines in a file?
- How to reverse the order of file content?
- How to join every 2 lines in a file?
- How to insert a line before or after a pattern?
- How to read 2 files line by line alternatively?
- How to print few lines before a pattern match?
- How to insert a line after every n lines in Linux?
- How to change the delimiter of a file in Linux?
- How to find sum of all columns / numbers in a line?
- How to remove duplicate records from a file in Linux?
- How to find duplicate records of a file?
- How to find the total count of a word / string in a file?
- How to remove a component of absolute path?
- How to retrieve or extract the tag value from XML in Linux?
- How to swap 2 columns in a file in Linux?