Unix - vsevolod-ivanov/Ivanov-Group-Wiki GitHub Wiki

Here is a nice list of basic Unix commands: https://kb.iu.edu/d/afsk

Useful Commands

Print a file to the shell:

cat myfile.txt

Search a file for a specific string:

grep 'mystring' myfile.txt

Or, if you want to output every line, search for a space character:

grep ' ' myfile.txt

Print selected lines (for example lines 10-25), two options:

sed –n '10,25p;26q' myfile.txt
awk 'FNR>=10 && FNR<=25' myfile.txt