Reference no: EM1336472
1. Describe the results of executing each of the following grep commands in your home directory.
a. grep -c ill memo
b. grep -n ill memo
2. What would the permission section of an ls -l listing for filex look like after setting the following permissions?
a. chmod 764 filex
b. chmod 666 filex
3. Rewrite the following sequence of commands using sort as a filter. You should end up with a single command line when you are done.
$ sort roster > temp
$ lpr temp
$ rm temp
4. Write a command, assuming your home directory, to list all files that:
a. Start with the letters b or f.
b. Start with the letters a through k.
c. Have a capital letter anywhere in their name.
5. What is the difference between the following commands?
$ cat xyz[12]
$ cat xyz[1-2]
6. What files would the following match?
$ ls -l file[1-20]
7. Write a script that will prompt for the user's first name and store it in a variable. Then prompt for the last name and store it in a variable. Finally, display the stored information in the format "You entered lastname, firstname" and ask the user for confirmation. If the answer is "y" or "yes" then say "Thank you!" if the answer is "n" or "no" then start again with the prompts.