Bonus Assignment
Due: 4/29, Monday, in class.
Write a shell script "countv" that takes the side of a cube as a command line argument and displays the volume of the cube.
Assignment18
Due: 4/17, Friday.
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
Assignment17
Due: 4/8, Wednesday.
Use a regular expression to describe the following string:
1). all even numbers less than 10.
2). all even numbers.
3). all strings start with 100 and end with 001.
Assignment16
Due: 4/3, Friday.
Use a regular expression to describe all integer numbers.
Assignment15
Due: 4/1, Wednesday.
Read the class note, and try shell commands: head, tail, wc, diff, uniq. Write down the outputs.
Assignment14
Due: 3/27, Friday.
Matching the following regular expressions with the related strings.
Assignment13
Due: 3/25, Wednesday.
Read the class note, and try shell commands: cat, nl, pr, and more to view the content of a text file. Describe the difference of the 4 commands.
Assignment12
Due: 3/20, Friday.
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
Assignment11
Due: 3/18, Wednesday.
Matching the following files with related directories.
Assignment10
Due: 2/20, Friday.
Do some research online, and describe how the file system is organized in Linux.
Assignment9
Due: 2/18, Wednesday.
Write down the related commands in vi editor:
1. Move the cursor to the last line.
2. Move the cursor to the last character of the current line.
3. Move backward 6 words.
4. Read and insert the content of file "grade.txt" to the current file.
5. Search "Alex" in the whole document and replace it with "Bob".
Assignment8
Due: 2/13, Friday.
Write down the related commands:
1. Delete 3 words in vi editor
2. Move the cursor to the 2nd line in vi editor
3. Quit the vi editor without saving any change
4. Copy 4 lines in vi editor
5. move the cursor forward 5 words in vi editor.
Assignment7
Due: 2/11, Wednesday.
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:
Assignment6
Due: 2/6, Friday.
Describe the following functions for a TEXT Editor in vi editor:
1. How to open a file?
2. How to switch from ''command mode'' to ''insert mode'' and from ''insert mode'' to ''command mode''?
Assignment5
Due: 1/30, Friday, in class.
Do some research online, and list some basic functions for a text editor.
Assignment4
Due: 1/28, Wednesday, in class.
Write down correct shell command for the following requirements:
1. Display the path of the current directory (write down the result as well);
2. Change the current working directory to /home/student/Desktop;
3. Create a directory named "course430";
4. Change the current directory to the created directory;
5. Change the current directory to the parent directory;
6. Delete the directory "course430";
7. Display the host computer name;
8. Display the effective user id;
9. Display the calender;
10. Print a file named "abc".
Assignment3
Due: 1/23, 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 "more".
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".
Assignment2
Due: 1/16, Friday, in class.
Experience Ubuntu and describe what you tried and how it compares to Windows program.
Assignment1
Due: 1/14, Wednesday, in class.
Do research on Open Source and Linux, answer the following questions:
1) What is Open Source?
2) Describe brief history of Linux.
3) How to install Ubuntu in a computer system?
4) List related references (where are your answers from?).