Assignment techniques

Select an approach for the items in a session

There are three ways to approach each item in the session. Pick the one that is appropriate for each item.

  • If you can do the work for the item by issuing a command, use script to capture the command and result.
  • If reading a man page is required, do NOT use script; read the man page and type a short summary.
  • If it is something you cannot do with a command and script, just type the answer.

The result you capture or write should usually be only a few lines long, and never very long.

Read what you need to do in the session, and plan how you will capture or write the answers for each item in the session.

Plan your session

As an example, I will plan Chapter 1 session 1.

I will use script to capture the material for items 4 and 5. I will just type the other items.

Using script

Use script to capture the commands.
Type the commands, and received the result.

[oldham@voyager temp]$ script
Script started, file is typescript
[oldham@voyager temp]$ echo $SHELL
/bin/bash
[oldham@voyager temp]$ exit
exit Script done, file is typescript

Use col -bx to clean up the line feeds.

[oldham@voyager temp]$ cat typescript | col -bx > chapter1_session1

Now chapter1_session1 looks like this.

Script started on Mon Jan 14 14:48:55 2011
0;oldham@voyager:~temp[oldham@voyager temp]$ echo $SHELL
/bin/bash
0;oldham@voyager:~temp[oldham@voyager temp]$ exit
exit

Script done on Mon Jan 14 14:49:03 2011

Use vim to clean up chapter1_session1 so it looks like this.

$ echo $SHELL
/bin/bash

Complete the editing

I then used vim to add the format and type the other answers.
The result, ready to turn in is:

Ira Oldham
CIS 18A 
Winter 2010
Assignment B
Chapter 1

Session 1
1. user id: oldham
2. password: **********
3. login: access voyager; enter user id and password
4. prompt: $
5. shell: Bourne Again(bash)
I can find out the login shell; that is the shell I use when I start using the system.
echo $SHELL
/bin/bash
6. passwd: previously done; I do not want to do it again
7. logout: logout or exit or ^D
          

Another example

This is my answer to chapter 1 session 2 item 3, which uses man:

3. man man
man has lots of options and commands
f or space to go to the next page - fast
b to go to previous page - slow
q quit
          

Alternate technique

A link to an alternate technique, using two unix windows with copy and paste, is given in the box to the left.