------------------------ Week 6 Notes for CST8129 ------------------------ -Ian! D. Allen - idallen@idallen.ca *** Keep up on your readings (Course Outline: average 5 hours/week homework) Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) VIM: using d? in vim movement: dd dh dj dk dl dw dG global search and replace: :1,$s/a/b/ Review: tree, sum, cat -n, last, diff -u, stty, cut -d -f, uniq -c - diff is for text files only, use cmp for all (including binary) files New: cmp (for any files) Fetching web pages: New: wget -O New: lynx -dump New: grep -A1 -e foo -e bar New: awk -F: '{print $5}' http://weatheroffice.ec.gc.ca/city/pages/on-118_metric_e.html lynx -dump http://weatheroffice.ec.gc.ca/city/pages/on-118_metric_e.html | grep -A1 -e Temperature -e Obser lynx -dump http://teaching.idallen.com/cst8129/05f/notes/ \ | grep -e exercise -e week New: awk -F: '{print $1}' (compare with cut -f 1) lynx -dump http://teaching.idallen.com/cst8129/05f/notes/ \ | grep -e exercise -e week | grep -v http | awk '{print $2}' New: cmp, find, groups, mail, tr, write, mesg tr -c -d -s gzip, gunzip, zcat, zless, zgrep, bzip2, bunzip2, bzcat, bzless, bzgrep script, col -b Note: col -b only reads stdin! no file names allowed. $ col -b