This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+----------------------------------------------------------------------------------------------------------------------------------------+ | |
| Task | One-Liner | |
+----------------------------------------------------------------------------------------------------------------------------------------+ | |
| Count the number of lines in a file | wc -l filename | | |
| ---------------------------------------------------------------------------------------------------------------------------------------- | |
| Show the field names, one in each line, preceded by line numbers | head -1 filename | tr ‘\t’ ‘\n’ | nl (tab-delimited file) | | |
| (helpful when you have numerous fields in a new file and want to | head -1 filename | tr ‘,’ ‘\n’ | nl (comma-delimited file) | | |
| get the lay of the land) |