Assignment9
Due: 11/24, Monday, in class.
What’s the output of the following shell script “compare” if we run “sh compare 11 8”? ______________
if [$1 –lt $2]
then
echo “$1 is smaller!”
exit 1
else
echo “$1 is bigger!”
exit 0
fi
Assignment8
Due: 11/12, Wednesday, in class.
Matching the following regular expressions with the related strings.
Assignment7
Due: 10/24, Friday, in class.
Assume a file "abc" has access permission: -rwx---rw-
What is the resulted access permission after executing the following command:
1. chmod ug-wx abc
2. chmod u+w abc
3. chmod ug=w abc
4. chmod go+rw abc
5. chmod 520 abc
6. chmod 213 abc
7. chmod g=u abc
8. unmask 120
9. unmask 023
10. chmod uo=g abc
Assignment6
Due: 10/22, Wednesday, in class.
Matching the following files with related directories.
Assignment5
Due: 9/24(extended), Wednesday, in class.
Describe the following basic functions for a TEXT Editor in vi editor:
1. Opening existing file:
2. Starting a new file:
3. Inserting text:
4. Deleting text:
5. Cursor movement:
6. Cut / copy / paste:
7. Saving:
8. Quitting with or without saving:
9. Search / replace:
Assignment4
Due: 9/10, Wednesday, in class.
Write down correct shell command for the following requirements:
1. Create a directory named "abc"
2. Get into directory "abc"
3. Show current working directory
4. Create a file named "first" with the content:
This is a testing file.
5. Show the content of "first"
6. Move to up level directory
7. Delete directory "abc"
8. Display the effective user id
9. Display the host computer name
10. Display the path(s) to command "ls"
Assignment3
Due: 9/5, Friday, in class.
Write down correct shell command for the following requirements:
1. Find out information about "print".
2. Find out information about shell command "cd".
3. Create a file "abc" with content "This is my first linux file."
4. Display the file content of "abc"
5. Copy file "abc" to "a1"
6. Rename "a1" to "b1"
7. Move file "b1" to directory "Desktop"
8. Delete file "abc".
Assignment1 & 2
Due: 8/29, Friday, in class.
Check handout1 and handout2 for details.