Results 1 to 2 of 2
could someone check out this hw sheet - I am a windows person needing help with a unix course - i have some answers filled in can u check
Provide ...
- 02-15-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 11
help
could someone check out this hw sheet - I am a windows person needing help with a unix course - i have some answers filled in can u check
Provide answers to all questions in the space provided
1. Describe the results of executing each of the following grep commands in your home directory. (1 pts each)
a. $ grep -c ill memo
print a count of matching lines for each input file.
b. $ grep -n ill memo
precedes each line with the line number where it was found
2. What would the permission section of an ls -l listing for filex look like after setting the following permissions? (1 pts each)
a. chmod 764 filex
ls -l filex
-rwxrw-r-- 1 itd0wks ioc 2 Feb 14 14:05 filex
b. chmod 666 filex
ls -l filex
-rw-rw-rw- 1 itd0wks ioc 2 Feb 14 14:05 filex
3. Rewrite the following sequence of commands using sort as a filter: (2 pts) You should end up with a single command line when you are done.
$ sort roster > temp
$ lp temp
$ rm temp
4. Write a command, assuming your home directory, to list all files that: (1 pts each)
a. Start with the letters b or f.
ls [b,f]*
b. Start with the letters a through k.
ls [a-k]*
c. Have a capital letter anywhere in their name.
ls [A-Z]*
5. What is the difference between the following commands? (1 pts)
$ cat xyz[12] $ cat xyz[1-2]
6. What files would the following match? (1 pts)
$ ls -l file[1-20]
7. (4 points)
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. (Hint: consider some form of loop construct…)
- 02-15-2009 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,096
Welcome to the forums!
Sorry, but it's against the forums rules to post homework questions.oz
→ new members/users: read this first | new member faq
→ no private messages requesting computer support - post them on the forums!
→ please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.


