* in Windows is "\r\n", in Unix/Linux it is "\n", on the Mac it is "\r". Propose a regular expression for gawk's "RS" that gets right in all cases. Apply to a file on a file that contains: echo -e "111\r222\n333\r\n444" | gawk --assign RS="..." '{print;}' Alternatively you can force the control characters into the file with emacs as follows: c-q c-m (\r) c-q c-j (\n) * Write a shell command that combines the best of "ls -l", "wc", and "file". Combine into one single command what you find most useful in each. * Write a one-liner that peels the IP address of your machine out of the output of the command "ipconfig" and uses it to set the DISPLAY variable in this format: xxx.xxx.xxx.xxx:0.0 You can add this line to your .bash_profile: export DISPLAY=... * Analyzing the book further, by chapter: First create a list of words and their counts in the book. Then join the words by their counts in each chapter. You can get this done by whatever computational means. * Timing experiments with I/O and sort: - Using gawk, generate files of increasing size containing random numbers, starting with size 100,000. Generate two types of files: . real random numbers written out with: print rand() > "randfile_real"; . integer random numbers written with: printf("%8d", 1000000*rand()) > "randfile_int"; . sort both files. Helpful: intermediate output of the form if(i%100000==0) print i > "/dev/stderr"; - Adorn the code with calls to "systime()" before and after random number printing. Do the same with gawk code that only generates random numbers but does not save them. For timing "sort", use "date". Comment on what seems to be computationally expensive.