[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SAGE] Unix training materials recommendations?
On Fri, May 07, 2004 at 10:28:38AM -0600, Yves Dorfsman wrote:
> On Fri, 7 May 2004, John Sechrest wrote:
>> Editing with emacs/vi and regular expressions is one of the things
>> that some of the secretaries just went gah gah over. Others choked
>> on it though.
> How true !!
> I used to teach UNIX classes for training companies, and vi was always in
> the curriculum of what I was supposed to teach. Typically I would teach it
> at the end of a day and tell people that they didn't need to know that but
> were welcome to stay, explaining that they should ask their sysadmin to
> install pico on their machine if they needed to edit files and weren't
> willing to learn vi.
> And sure enough one day I got "Are you Yves ? Aren't you the sysadmin at
> company X ? Will you install pico for me ? Can I go now...."
> Yves.
In my LPI classes the coverage of vi is handled as follows:
About 10-15 minutes before lunch (typically on the first day) I
show the students how to run vimtutor. I announce that all who are
proficient in vi are welcome to go to their break early. I then
hang out and let the others run through vimtutor while I'm available
to help. Often only a couple of students need to avail themselves of
the vimtutor session (my classes are usually for advanced UNIX admins
making the transition to Linux --- so we focus on how Linux differs
from other flavors of UNIX throughout).
After lunch I show people some intermediate and advanced vi tricks
and tips. The . (dot) command and setting and using marks with m,
' and ` are intermediate; :r! and !<movement><command/filter> are
advanced; "rY@r (Yank into register "r" then execute "r" as a command)
is the most advanced tip I cover. I explain that showing these more
"advanced" tricks is intended to tickle their interest rather than to
be comprehensive.
So, in about 20 minutes of class time I cover vi well enough that
people can learn the rest on their own *and* I show the old hands a
trick or two that most of them have never seen. I've found that very
few UNIX admins know how to use registers as command or understand the
bang command (filter lines enclosed from cursor to a movement through
any UNIX command).
For example I show how to sort the passwd file (1G!Gsort<Enter>) and
how to append a word count to the end of a text file (1GyGGp!Gwc<Enter>:
1G (go to top), yG (copy to end), G (go to end), p (paste), !G (filter
from here to end of newly appended material), wc<Enter> (the command
we're filtering the copy through). I also show them {!}fmt (format
this paragraph).
Since I'm teaching experienced systems administrators I rarely have
to convince my students of the necessity of learning vi; they
generally already understand it. No one has ever complained that the
time I spent on it was wasted. (Most of them do take off for lunch
early and are glad of it since I pack alot of other, far more dense
material into each day). As for the 5 to 10 minutes after lunch,
generally at least one of those tricks is new to almost everyone in
my classes.
--
Jim Dennis