Re: vi in /bin

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Matthew Szudzik
Date: Friday, December 18, 2009 - 8:46 am

On Thu, Dec 17, 2009 at 07:47:18PM -0500, Brad Tilley wrote:

If using ed is an "adventure", then you don't really know how to use vi.

ed, sed, and vi are three of the most important Unix utilities, and
there's no excuse for not learning all three.  That's because they all
use the same commands and syntax.  If you know how to use one of them,
then you know how to use the other two.

Each is useful in a slightly different situation.  vi is for interactive
editing.  ed and sed are most useful for writing editing scripts.  ed
reads a file into a buffer for editing and can write those edits back to
the file.  sed works as a filter, reading a stream from standard input
line-by-line and editing each line before writing it to standard output.
Short, one-line sed scripts are useful in command line pipes for
translating the output of one program into the input of another program.

Although most of the basic commands are the same in ed, sed, and vi,
there are subtle differences.  After you have spent some time using ed
and sed, I suggest that you ask yourself the follow questions to test
your understanding of those differences: "When is the global command
(that is, g) useful in ed and vi?  Why is the global command missing
from sed?"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
vi in /bin, Brad Tilley, (Thu Dec 17, 5:47 pm)
Re: vi in /bin, Randal L. Schwartz, (Thu Dec 17, 6:12 pm)
Re: vi in /bin, Brad Tilley, (Thu Dec 17, 6:23 pm)
Re: vi in /bin, Raymond Lillard, (Thu Dec 17, 8:26 pm)
Re: vi in /bin, David Gwynne, (Thu Dec 17, 10:07 pm)
Re: vi in /bin, Chris Bennett, (Thu Dec 17, 11:09 pm)
Re: vi in /bin, Woodchuck, (Fri Dec 18, 12:35 am)
Re: vi in /bin, Pieter Verberne, (Fri Dec 18, 12:36 am)
Re: vi in /bin, Philip Guenther, (Fri Dec 18, 12:47 am)
Re: vi in /bin, Han Boetes, (Fri Dec 18, 1:07 am)
Re: vi in /bin, Igor Sobrado, (Fri Dec 18, 2:28 am)
Re: vi in /bin, Paul M, (Fri Dec 18, 3:03 am)
Re: vi in /bin, Gregory Edigarov, (Fri Dec 18, 3:15 am)
Re: vi in /bin, Eugene Yunak, (Fri Dec 18, 7:33 am)
Re: vi in /bin, Dale Rahn, (Fri Dec 18, 8:40 am)
Re: vi in /bin, Matthew Szudzik, (Fri Dec 18, 8:46 am)
Re: vi in /bin, Nick Bender, (Fri Dec 18, 9:16 am)
Re: vi in /bin, Internet Retard, (Fri Dec 18, 10:10 am)
Re: vi in /bin, Chris Bennett, (Fri Dec 18, 10:30 am)
Re: vi in /bin, Nick Bender, (Fri Dec 18, 10:55 am)
Re: vi in /bin, ropers, (Fri Dec 18, 11:22 am)
Re: vi in /bin, Chris Bennett, (Fri Dec 18, 11:35 am)
Re: vi in /bin, Matthew Szudzik, (Fri Dec 18, 11:45 am)
Re: vi in /bin, Anders Langworthy, (Fri Dec 18, 12:29 pm)
Re: vi in /bin, Antoine Jacoutot, (Fri Dec 18, 3:57 pm)
Re: vi in /bin, Jason McIntyre, (Fri Dec 18, 4:16 pm)
Re: vi in /bin, Randal L. Schwartz, (Fri Dec 18, 4:27 pm)
Re: vi in /bin, Ingo Schwarze, (Fri Dec 18, 5:33 pm)
Re: vi in /bin, Paul M, (Sat Dec 19, 12:30 am)
Re: vi in /bin, Otto Moerbeek, (Sat Dec 19, 1:30 am)
Re: vi in /bin, Jason McIntyre, (Sat Dec 19, 2:01 am)
Re: vi in /bin, Henning Brauer, (Sat Dec 19, 5:13 am)
Re: vi in /bin, Matthew Szudzik, (Sat Dec 19, 10:34 am)
Re: vi in /bin, Ingo Schwarze, (Sat Dec 19, 10:51 am)
OpenBSD sed vs GNU sed, Hugo Villeneuve, (Mon Dec 21, 6:37 pm)
Re: OpenBSD sed vs GNU sed, Matthew Szudzik, (Mon Dec 21, 7:32 pm)
Re: OpenBSD sed vs GNU sed, Hugo Villeneuve, (Fri Dec 25, 10:59 am)
Re: OpenBSD sed vs GNU sed, Matthew Szudzik, (Fri Dec 25, 11:18 am)