Command line text processing with GNU Coreutils

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Author(s): Sundeep Agarwal
Year: 2021

Language: English
Pages: 111

Preface
Prerequisites
Conventions
Acknowledgements
Feedback and Errata
Author info
License
Book version
Introduction
Installation
Documentation
cat and tac
Creating text files
Concatenate files
Accepting stdin data
Squeeze consecutive empty lines
Prefix line numbers
Viewing special characters
Useless use of cat
tac
Customize line separator for tac
head and tail
Leading and trailing lines
Excluding the last N lines
Starting from Nth line
Multiple input files
Byte selection
Range of lines
NUL separator
Further Reading
tr
Translation
Different length sets
Escape sequences and character sets
Deleting characters
Complement
Squeeze
cut
Individual field selections
Field ranges
Input field delimiter
Output field delimiter
Complement
Suppress lines without delimiters
Character selections
NUL separator
Alternatives
seq
Integer sequences
Floating-point sequences
Customizing separator
Leading zeros
printf style formatting
Limitations
shuf
Randomize input lines
Limit output lines
Repeated lines
Specify input as arguments
Generate random numbers
Specifying output file
NUL separator
paste
Concatenating files column wise
Interleaving lines
Multiple columns from single input
Multicharacter delimiters
Serialize
NUL separator
pr
Columnate
Customizing page width
Concatenating files column wise
Miscellaneous
fold and fmt
fold
fmt
sort
Default sort and Collating order
Ignoring headers
Dictionary sort
Reversed order
Numeric sort
Human numeric sort
Version sort
Random sort
Unique sort
Column sort
Character positions within columns
Debugging
Check if sorted
Specifying output file
Merge sort
NUL separator
Further Reading
uniq
Retain single copy of duplicates
Duplicates only
Unique only
Grouping similar lines
Prefix count
Ignoring case
Partial match
Specifying output file
NUL separator
Alternatives
comm
Three column output
Suppressing columns
Duplicate lines
NUL separator
Alternatives
join
Default join
Non-matching lines
Change field separator
Files with headers
Change key field
Customize output field list
Same number of output fields
Set operations
NUL separator
Alternatives
nl
Default numbering
Number formatting
Customize width
Customize separator
Starting number and increment
Section wise numbering
Section numbering criteria
wc
Line, word and byte counts
Individual counts
Multiple files
Character count
Longest line length
Corner cases
split
Default split
Change number of lines
Split by byte count
Divide based on file size
Interleaved lines
Custom line separator
Customize filenames
Exclude empty files
Process parts through another command
csplit
Split on Nth line
Split on regexp
Regexp offset
Repeat split
Keep files on error
Suppress matched lines
Exclude empty files
Customize filenames
expand and unexpand
Default expand
Expand only initial tabs
Customize tab stop width
Default unexpand
Unexpand all blanks
Change tab stop width
basename and dirname
Extract filename from path
Remove file extension
Remove filename from path
Multiple arguments
Combining basename and dirname
NUL separator
What next?