1. In a shell script, how do we indicate the first, second, and third command line arguments. How about all of them?
2. How do you make an awk script executable within a file?
3. Give a unix command for locating all files of a certain type on the G: drive and copying them to C:\myfiles. How would you count how many there are and list them?
4. Give the command for writing a CD-ROM mounted on /dev/cdrom to a file in your home directory.
5. Give a command that lists all directories in the present working directory (pwd). How would you modify it to list all character or block devices in /dev?
6. Give a command that saves an inventory of all files on your system.
7. Give a one line command that locates all instances of a certain string in a certain location.
8. Give a one line command that parses all words in a text file and gives the frequency of each.
9. Give a one line command that prints a list of all users listed in /etc/passwd and nothing else.
10. Give a command for archiving all the files in your home folder. How would you modify it to save a compressed version? What is the command for extracting a compressed tar file?
11. Give a unix command for locating a word "pattern" in a directory and all its sub-directories.
12. Write a bash script that does the following: prints the contents of /etc/hosts and prints the contents of the file system table.
13. Write a script that takes as input a pattern then kills all processes that satisfy the pattern.
14. Using awk, look for a pattern and, if is found, prints the line containing it. How would you modify this to run an application like notepad?
15. Create a symbolic link from your home directory to another location.