CS 279 - Week 14 Lecture 1 - 11-28-12

bash does have a case statement --
here's its basic syntax:

case <expression> in
    <pattern1>) <command1>
                <command2>
                ;;

    <pattern2>) <command>
                ;;

    *)          <commands>
                ;;
esac

*   semantics: it compares the <expression> to each <pattern>
    in turn, and as soon as it matches 1, it does that
    pattern's actions, and then exits the case statement

    notice the *) case IS optional -- if NO cases
    match, NONE of the case branches are taken

RCS - Revision Control System
*   Walter Tichy, 1982, stores versions of a file with
    a complete copy of the latest version, and differences
    (deltas) between it and previous versions

*   text discusses RCS on pp. 302-306, also

*   an RCS revision group file is a file name
    followed by ,v

    there's a number of ways to create this, BUT
    a very simple way is to use the check-in command, ci,
    to check in a version of a file that hasn't been
    checked in before

    ci myfile

    ...result is myfile,v
    (and you don't see myfile -- BUT you can check out
    another copy easily with check-out command, co)

*   co -l myfile
    ...check-out the latest version of myfile from
    myfile,v and give me the lock (so I can update it)

    co myfile
    ...check out a read-only version of myfile from
    myfile,v

*   rlog myfile
    ... I'll get listing of versions and log entries

*   rcsdiff myfile
    ...I'll get the differences between my copy of the
    file and the latest version