This article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Is this really the most common usage for the word Ed? Among the general population the nickname, television show, and movie, would all be better known than the text editor. Perhaps the disambig page should be moved here. - SimonP 02:59, August 31, 2005 (UTC)
No, but everyone else is Ed Something. And nobody will search for Ed when looking for Ed McMahon. Ed the editor is the only thing that is JUST ed. -- Xanthar 09:54, 20 October 2005 (UTC)
perhaps show the fuller $ ed [file?] at the begining of the session at least, so we know we don't start out of thin air.
"The ed commands are often imitated in other line-based editors. For example, EDLIN in early MS-DOS versions had a somewhat similar syntax, and text editors in many MUDs (LPMud and descendants, for example) use ed-like syntax. These editors, however, are typically more limited in function."
I was tempted to add "as hard as that may be to believe", but since ed does have regexen, I let it slide. 82.92.119.11 23:31, 8 June 2006 (UTC)
I'm no great fan of ed and I'm no expert on it, either. However, I do know that a real master at ed can be amazingly adept at using it. The little example session is adequate for giving the flavor of how a novice might use it; but I'm sorely tempted to add a section on advanced editing techniques that show how someone with a modicum of proficiency might use it.
For example:
$ed /etc/passwd ,n 1 root:x:0:0:root:/root:/bin/sh 2 daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 bin:x:2:2:bin:/bin:/bin/sh 4 sys:x:3:3:sys:/dev:/bin/sh 5 sync:x:4:65534:sync:/bin:/bin/sync 6 games:x:5:60:games:/usr/games:/bin/sh 7 man:x:6:12:man:/var/cache/man:/bin/sh ... 20 lp:x:7:7:lp:/var/spool/lpd:/bin/sh 21 mail:x:8:8:mail:/var/mail:/bin/sh 22 news;x:9:9: news:/var/spool/news:/bin/sh 23 uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh Press <RETURN> to continue... /^bin/,/^lp/d 1t10 s/root/foo/ s/0:0:root/123:123:Fred O. Oppenheimer/ s:/root:/home/foo: 10p foo:x:123:123:Fred O. Oppenheimer:/home/foo:/bin/sh w q $
... etc.
Note that using ,n was a quick way to browse the whole file with the lines numbered. Patterns like /foo/,/^bar/ could be used with l, p, or n to view ranges of lines between two patterns ... as well as deleted or copied with commands like d and t (transfer).
So this example edits a Unix passwd file, removes all the accounts between (and including) bin through lp, then transfers a copy of line 1 to the line following line 10; and finally substitues new username, UID/GID and GECOS "full name" fields into that line and changes the home directory for this new account and finally prints the resulting line, and writes then quits. This just a trite example, and I'm certainly no master at ed (I mostly bumble through on a dim memories of ex which mostly works the same. However, sometimes I still find occasional to use more advanced ex commands when I'm using vi --- like the time recently when I needed to clean up a long list where the lines at been wrapped in an e-mail cut and paste, and I need them back in their canonical form. I would have taken forever by hand, but using :%g/^[^0-9]/j did it in a blink).
BTW it seems oddly worth noting that, in the rare case where you need to add a line consisting only of a single "dot" then you can accomplish it in ed by adding a line containing an x (any arbitrary character or string) and following that with a command like: s/x/./ - JimD, 09:34, 24 April 2007
Great article! Thanks all. - Tyler Oderkirk ( talk) —Preceding comment was added at 17:31, 2 February 2008 (UTC)
How exactly is this true? As far as I know at least vi is part of both SUSv2 and POSIX, and many other editors could be considered "standard unix editors". If it turns out to be true that ed is in some relevant sense more standard than the other standard editors, then I think at least a citation is needed. Otherwise I think it should really say "[...] is a standard [...]" or similar. (I won't change this now, since I see that this sentence was already changed back and forth several times.) — 128.32.153.89 ( talk) 01:00, 5 March 2009 (UTC)
16-April-2009: I have added subheaders above as "Topics from 2005" (etc.) to emphasize the dates of topics in the talk-page. Older topics might still apply, but using the year headers helps to focus on more current issues as well. Afterward, I dated/named unsigned comments and moved entries (including "Gratitude") into date order for 2008. - Wikid77 ( talk) 16:09, 16 April 2009 (UTC)
This line could use citation:
"If something goes wrong, ed is sometimes the only editor available. This is often the only time when it is used interactively."
I'm genuinely curious about this and would love to know where that comes from. — Preceding unsigned comment added by Jacobmoe ( talk • contribs) 01:22, 21 September 2013 (UTC)
Same problem that we had here: 1971 can hardly be considered the year of "first release" of ed, since Unix wasn't "released" in that year except to Bell Labs's patent department, by Bell Labs's computer research group. QVVERTYVS ( hm?) 15:22, 10 September 2015 (UTC)
Hello fellow Wikipedians,
I have just modified 2 external links on Ed (text editor). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 5 June 2024).
Cheers.— InternetArchiveBot ( Report bug) 01:45, 17 September 2017 (UTC)
This links to GNU's reimplementation, not the standard ed(1). I believe this should be clarified. 91.141.1.75 ( talk) 07:50, 3 July 2018 (UTC)
This article is rated B-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Is this really the most common usage for the word Ed? Among the general population the nickname, television show, and movie, would all be better known than the text editor. Perhaps the disambig page should be moved here. - SimonP 02:59, August 31, 2005 (UTC)
No, but everyone else is Ed Something. And nobody will search for Ed when looking for Ed McMahon. Ed the editor is the only thing that is JUST ed. -- Xanthar 09:54, 20 October 2005 (UTC)
perhaps show the fuller $ ed [file?] at the begining of the session at least, so we know we don't start out of thin air.
"The ed commands are often imitated in other line-based editors. For example, EDLIN in early MS-DOS versions had a somewhat similar syntax, and text editors in many MUDs (LPMud and descendants, for example) use ed-like syntax. These editors, however, are typically more limited in function."
I was tempted to add "as hard as that may be to believe", but since ed does have regexen, I let it slide. 82.92.119.11 23:31, 8 June 2006 (UTC)
I'm no great fan of ed and I'm no expert on it, either. However, I do know that a real master at ed can be amazingly adept at using it. The little example session is adequate for giving the flavor of how a novice might use it; but I'm sorely tempted to add a section on advanced editing techniques that show how someone with a modicum of proficiency might use it.
For example:
$ed /etc/passwd ,n 1 root:x:0:0:root:/root:/bin/sh 2 daemon:x:1:1:daemon:/usr/sbin:/bin/sh 3 bin:x:2:2:bin:/bin:/bin/sh 4 sys:x:3:3:sys:/dev:/bin/sh 5 sync:x:4:65534:sync:/bin:/bin/sync 6 games:x:5:60:games:/usr/games:/bin/sh 7 man:x:6:12:man:/var/cache/man:/bin/sh ... 20 lp:x:7:7:lp:/var/spool/lpd:/bin/sh 21 mail:x:8:8:mail:/var/mail:/bin/sh 22 news;x:9:9: news:/var/spool/news:/bin/sh 23 uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh Press <RETURN> to continue... /^bin/,/^lp/d 1t10 s/root/foo/ s/0:0:root/123:123:Fred O. Oppenheimer/ s:/root:/home/foo: 10p foo:x:123:123:Fred O. Oppenheimer:/home/foo:/bin/sh w q $
... etc.
Note that using ,n was a quick way to browse the whole file with the lines numbered. Patterns like /foo/,/^bar/ could be used with l, p, or n to view ranges of lines between two patterns ... as well as deleted or copied with commands like d and t (transfer).
So this example edits a Unix passwd file, removes all the accounts between (and including) bin through lp, then transfers a copy of line 1 to the line following line 10; and finally substitues new username, UID/GID and GECOS "full name" fields into that line and changes the home directory for this new account and finally prints the resulting line, and writes then quits. This just a trite example, and I'm certainly no master at ed (I mostly bumble through on a dim memories of ex which mostly works the same. However, sometimes I still find occasional to use more advanced ex commands when I'm using vi --- like the time recently when I needed to clean up a long list where the lines at been wrapped in an e-mail cut and paste, and I need them back in their canonical form. I would have taken forever by hand, but using :%g/^[^0-9]/j did it in a blink).
BTW it seems oddly worth noting that, in the rare case where you need to add a line consisting only of a single "dot" then you can accomplish it in ed by adding a line containing an x (any arbitrary character or string) and following that with a command like: s/x/./ - JimD, 09:34, 24 April 2007
Great article! Thanks all. - Tyler Oderkirk ( talk) —Preceding comment was added at 17:31, 2 February 2008 (UTC)
How exactly is this true? As far as I know at least vi is part of both SUSv2 and POSIX, and many other editors could be considered "standard unix editors". If it turns out to be true that ed is in some relevant sense more standard than the other standard editors, then I think at least a citation is needed. Otherwise I think it should really say "[...] is a standard [...]" or similar. (I won't change this now, since I see that this sentence was already changed back and forth several times.) — 128.32.153.89 ( talk) 01:00, 5 March 2009 (UTC)
16-April-2009: I have added subheaders above as "Topics from 2005" (etc.) to emphasize the dates of topics in the talk-page. Older topics might still apply, but using the year headers helps to focus on more current issues as well. Afterward, I dated/named unsigned comments and moved entries (including "Gratitude") into date order for 2008. - Wikid77 ( talk) 16:09, 16 April 2009 (UTC)
This line could use citation:
"If something goes wrong, ed is sometimes the only editor available. This is often the only time when it is used interactively."
I'm genuinely curious about this and would love to know where that comes from. — Preceding unsigned comment added by Jacobmoe ( talk • contribs) 01:22, 21 September 2013 (UTC)
Same problem that we had here: 1971 can hardly be considered the year of "first release" of ed, since Unix wasn't "released" in that year except to Bell Labs's patent department, by Bell Labs's computer research group. QVVERTYVS ( hm?) 15:22, 10 September 2015 (UTC)
Hello fellow Wikipedians,
I have just modified 2 external links on Ed (text editor). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018.
After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than
regular verification using the archive tool instructions below. Editors
have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the
RfC before doing mass systematic removals. This message is updated dynamically through the template {{
source check}}
(last update: 5 June 2024).
Cheers.— InternetArchiveBot ( Report bug) 01:45, 17 September 2017 (UTC)
This links to GNU's reimplementation, not the standard ed(1). I believe this should be clarified. 91.141.1.75 ( talk) 07:50, 3 July 2018 (UTC)