ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Talk:Ed (text editor) - Wikipedia, the free encyclopedia

Talk:Ed (text editor)

From Wikipedia, the free encyclopedia

This article is within the scope of Computing WikiProject, an attempt to build a comprehensive and detailed guide to computers and computing. If you would like to participate, you can edit the article attached to this page, or visit the project page, where you can join the project and/or contribute to the discussion.
B This article has been rated as B-Class on the quality scale
Low This article has been rated as low-importance on the importance scale

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)

Yeah, except for "the nickname, television show, and movie". Those numbers again are "the nickname, television show, and movie". - 210.49.214.102 06:20, 3 December 2005 (UTC)

[edit] shell prompts

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)

[edit] Short Shrift by Poor Example

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/./

[edit] Gratitude

Great article! Thanks all. - Tyler Oderkirk (talk) —Preceding comment was added at 17:31, 2 February 2008 (UTC)


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -