Question Marks in ed
I typed the following commands: Code: 176 lab2-37:~> ed newb.txt
add the script
Please note the second-to-last line: I want to quit the ed, so I typed q, but instead of quitting immediately, the ed gave me a question mark, why? ---------------------------------------------------------- You had not written the file. Another q will exit. ---------------------------------------------------------- Thanx. I know why now. Code: If changes have been made in
the buffer since the last w command that
wrote the entire buffer, ed will warn the user
"?\n" (followed by an explanatory message
if help mode has been enabled via the H command)
to standard output and
---------------------------------------------------------- I'm a little bit confused about ed. What's the use of ed since there are such more powerful editors like vim, emacs, etc.? ---------------------------------------------------------- ed is a really old editor, and beleive it or not, there are old systems like telephone switches that the only text editor available is ed. This is when I learned it and still use it. Another use is when you have several things in a window you want to paste into a file, but don't want to lose it (by opening vi), you can use ed and accomplish this. Of course a second window will do the same thing. Given the choice, most people will use vi (including me).
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|