1.<
python read-input.py < nums-0-999
2.> >>
ls /home/jackiechen/ >home.txt
ls /home/jackiechen/ >>home.txt
cat < foo > foo //Attention
cat < foo >> foo //Attention
3.head tail
head -n 3 table //head -n -2 table
tail -n 3 table
head -n 3 table|tail -n 2
4.tr
tr -s "\n" <bad-new-line >good-new-line
5.sort
cat pumpkinsizes |tail -n +3|sort -n -t '|' -k2 -r|head -n 3
cat pumpkinsizes |tail -n +3|sort -n -t '|' -k2|head -n 2
6.uniq
cat words|tr [:space:] "\n"|tr [:punct:] "\n"|tr -s "\n"|sort |uniq >words-sorted
cat words|tr [:space:] "\n"|tr [:punct:] "\n"|tr -s "\n"|sort |uniq -cd |sort -n -k1 > words-count
7.cut
wc -w words|cut -d " " -f 1
8.join
join <( cat pumpkinsizes|tail -n +2|sort) <( cat emails |sort)
join <( cat pumpkinsizes|tail -n +2|sort) <( cat emails |sort)|tr -d "|" |sort -k2 -nr|head -n1|cut -d " " -f 3
grep "[0-9]$" pumpkinsizes |sort -k2 -t '|' -n|tail -n 1 >winer |join emails winer|cut -d " " -f 2
9.sed
10.awk
11.tee
12.comm
13.grep