CS 497C - Homework 5 - Name:_________________ DUE: Monday, November 5 (in class) Please show all work on a separate sheet attached to this sheet. (50 points - 5 points for each problem) + (5 bonus points) 1. Match the filename chapa, chapb, chapc, chapx, chapy, and chapz with one expression. Does rm * remove all files? 2. Make this setting at the command prompt. Can you execute $x? Why? x='ls | more' or set x='ls | more' (C shell) What is the difference between directory='pwd' and directory=`pwd`. 3. You want to concatenate two files, foo1 and foo2, but also insert some text in between from the terminal. How will you do this? 4. What is a filter? Where does a filter get its input from? 5. Using command substitution, write a command sequence which always prints calendar of the current month. 6. Select lines 5 to 10 of a file in two ways by using head and tail. 7. Extract the names of the users from /etc/passwd after ignoring the first 10 entries. 8. Sort the file /etc/passwd on GUID (primary) and UID (secondary) so that the users with same GUID are placed together. Users with a lower UID should be placed higher in the list. 9. Devise a command sequence which lists the five largest files in the current directory. 10. List the users logged in more than once. 11. Invert the names in short list on Page 275 and place a comma after the last name (i.e. last name, firt name). What the result should look like is as below: 2233|harris, charles |g.m. |sales |12/12/52| 90000 9876|johnson, bill |director |production|03/12/50|130000 5678|dylan, robert |d.g.m. |marketing |04/19/43| 85000 2365|woodcock, john |director |personnel |05/11/47|120000 5423|wood, barry |chairman |admin |08/30/56|160000