Solutions to Lab 8 ------------------ 1. Here's a gawk script: NR == 1 { saved = $0 print $0 next } { if (saved == $0) { next } else { print $0 saved = $0 } } 2. Here's a gawk script: { if (store[$0] == 1) { } else { print store[$0] = 1 } } 3. sort +2 -3 +0 +1 -2 +3 oldphonenumbers.txt In the above command, the "+1" and "+3" parts are not absolutely necessary but it is good to be pedantic and make our intentions clear to a fellow programmer.