$ command line ruby cheat sheets
Cheat Sheet Title: [ no_spaces_alphanumeric_only ]
Cheat Sheet:Prints selected parts of lines (of a text file), or, in other words, removes certain sections of a line. You may wish to remove things according to tabs or commas, or anything else you can think of... Options for cut: -d # allows you to specify another delimiter cut -d ':' /etc/passwd -f # columns, separated by delimiter cut -d ',' -f 1 /etc/passwd , # separate numbers, used to cut particular columns. cut -d ':' -f 1,7 /etc/passwd - # from line x to line y cut -c 1-50 file1.txt -x # cut from line 1 to “x” x- # cut from “x” to the end. cut -5, 20-, 8 file2.txt
Your cheat sheet will be editable (fixable) by anyone. Each cheat sheet is essentially a wiki page. It may also be used by millions of people for reference purposes from the comfort of their command line. If this is okay with you, please save.
Advertisement