CS476/576

Assignment #1

Due Midnight, Wednesday   Sept  28, 2005


PART 1:

Write a  shell script (in any shell you like)  with the following descriptions:

NAME


ref -   rename extension of files.

SYNOPSIS

ref   <old>  <new>

DESCRIPTION

This comand is used to change the  extension for a group of files.

Examples:

> ls

f1.c f1.htm f1.txt f2.c f2.txt f3.c f3.htm f3.txt ref

> ref    .htm   .html

> ref   .c       .cc

> ref    .txt    -txt

> ls

f1.cc f1.html f1-txt f2.cc f2-txt f3.cc f3.html f3-txt ref
  
  
  


PART 2:

Write a  shell script (in any shell you like)  with the following descriptions:

NAME


loginfo -   login info

SYNOPSIS

loginfo  [<word>]

DESCRIPTION

This comand is used to gather particular information about  login users.
The hosts at odu where  users may  login are listed in:  hostlist

Th inforamtion about each user are:

login_name:  full-name  (group)

Examples:

wahab: Dr. wahab (faculty)
lal-sula: Laith Al-sulaiman (grad)
phyl: Phyllis Woods (office)
dallen: daniel allen (student)

The program has one optional argument [<word>].

If the argument is missing, then information about all current users are displayed, otherwise the information about users who match the <word> are displayed.

Examples:

loginfo    cox

brunelle: Janet Brunelle        (faculty)

dallen: daniel allen    (student)

egranlun: eric granlund (student)

escott: eric scott      (student)

gao_s: Sheng Gao        (grad)

gjenning: grant jennings        (student)

igullett: ian gullett   (student)

jplaton: joshua platon  (student)

kjackson: Kyle Jackson  (student)

lde: Frederico De La Puente Gomez       (student)

mklein: Martin Klein    (grad)

mln: Michael Nelson     (faculty)

ohunsick: olena hunsicker       (student)

scoogan: sean coogan    (student)

syemialy: siarhei yemialyanau   (student)

tromero: thomas romero  (student)

> loginfo   verizon

cboont: Chutima Boonthum        (grad)

cs476: cs476 grader     (cs350)

> loginfo | grep faculty 

assefaw: Assefaw Gebremedhin    (faculty)

brunelle: Janet Brunelle        (faculty)

cs410: CS410    (faculty)

grosch: Dr. Grosch      (faculty)

ibl: Dr. Irwin Levinstein       (faculty)

jbollen: Johan Bollen   (faculty)

mln: Michael Nelson     (faculty)

pothen: Alex Pothen     (faculty)

price: Hill Price       (faculty)

ray: Dennis Ray (faculty)


  SEE ALSO

rsh, who,  ypcat passed,  ypcat group