HOME > > ed <

ed <

ed 篏帥c罐純c帥鐚罩g∈荐違c帥我с罐純 ed 篏帥違с鐚帥т戎篁ヤ GNU ed 0.2 ц

gnu.org 臀吾с若潟莢若c

http://www.gnu.org/fun/jokes/ed.html 筝茵吾 ed ャ若鐚鐚鐚激с祉鴻

http://www.gnu.org/fun/jokes/ed.msg.html ャ≪鐚鐚鐚

茫綽泣

  • ed 鐚茹c雁
  • ed ユ茯鐚ユ茯障障篏帥
  • 罧笈遵壕鐚sed с膂≦
  • ed у茯絽潟篏鐚茯絽潟 ed 膣

    ed

    筝綽膣剛

    ed 絲乗援篏帥鴻c帥с鐚<с篏帥鴻с鐚鴻сEmacs vi 紊ed 潟潟≪若ュ≪若鴻с Emacs 違vi сed 若純潟ゃ潟网綽泣憜茵网綽泣鴻 vi 違ed ゅ荀筝紊с劫彰腓榊荀羆<絎鴻茵腓冴сゃ障ed 鴻若潟c帥с

    ed 潟潟紊1 篁ヤ≪鴻茵憗 1 や札筝茵絲乗院絎茵鐚 vi x 潟潟若純筝筝絖絲乗院絎茵篌若 ed с鐚紊荀筝若純弱茵筝筝紊眼違茵絲乗院臀潟潟篏帥

    篏ャc鴻a 潟潟憜茵緇違茵水ャュ≪若ャ蚊ゃ茵ュュ≪若腟篋с

    吟筝紊тed 腟篋潟潟 q с鐚<絎鴻篆絖倶 q 潟潟ゃ篆絖篆 ? 菴翫翫綺 q 潟潟ゃ腟篋с鐚

    ≪鴻絎

    ed с潟潟≪若潟茵腓冴篁ヤ箴с激с

    $ ed -p'> ' test.txt
    

    ed 莎桁潟潟潟 > 茵腓冴若吾茯帥с

    ed 潟潟[address[,address]]command[parameters] 罕ゃャ≪吾荀command 絽亥 [address[,address]]command[parameters] 篏ャс荀с

    潟潟潟潟臀≪鴻腓冴茵絲障絎茵潟潟綽荀≪鴻違違違p 潟潟篋ゃ≪鴻綽荀鐚篋ゃ≪壕篏鐚膀蚊茵腓冴

    篋ゃ≪鴻綽荀潟潟≪鴻 1 ゃ絎c翫篋ょ≪鴻筝ょ絎茹i

    > 5,5p
    > 5,p
    > 5p
    

    潟 5 茵絎鴻茵腓冴鐚p <絎鴻茵腓冴潟潟鐚

    莇潟荐ced 絲乗援篏帥篁ヤ≪鴻ャ罘篌紊c≪鴻障ゃャ翫篏茹c ed 膺緇筝ゃ泣

    ≪鴻 1 絎c翫篏潟潟違違p с憜茵 1 ょ 2 ょ≪鴻絎茹cゃ障憜 10 茵

    > 10,10p
    > p
    

    2 ゃ潟

    = 絎茵茵垩茵腓冴潟潟с筝ゃ絲乗院≪鴻緇腟茵сc憜 10 茵ゃ<ゃ 10 茵紊茵c違

    > 10=
    > =
    

    違茵垩茵腓冴憜茵茵垩ャ違憜茵≪鴻腓冴 .鐚鐚篏帥c

    > .=
    

    綽荀祉劫ャ≪鴻腓冴 $ 腟茵

    障劫ャ≪合蚊% , <茵緇茵障сc

    > 1,$p
    > %p
    > ,p
    

    <絎鴻茵腓冴 ; 憜茵腟茵障сc

    > .,$p
    > ;p
    

    潟鐚緇菴違祉篏帥c .,$-p 憜茵腟茵筝茵障с茵腓冴絲障;-p 蕁絖帥 Invalid address 若c障鐚

    ≪鴻祉絎с- 障 ^ 茵腓冴+ 罨<茵腓冴-- +++ 篏帥с-- -2++ +2 吾сc

    > 10p
    > 9+p
    > 8+2p
    > 12--p
    > 6+2+2p
    > 10+2-2p
    

    10 茵茵腓冴祉堺≪鴻絎翫憜茵堺c憜 10 茵

    > +p
    > +1p
    > ++-p
    > +2-p
    

    鴻 11 茵茵腓冴

    = 障-= .-= 潟сc$-= 潟с鐚cf. ≪鴻障c絎翫= $= с鐚

    ≪鴻潟潟緇紊違絎с翫潟潟綽荀≪鴻違絎≪鴻緇篏帥

    p 篋ゃ≪鴻緇

    > 10,11p
    > 9,10,11p
    > 12,10,11p
    

    潟障= 筝ゃ≪鴻緇

    > 3=
    > 10,3=
    > 10,1,3=
    

    潟潟c篏帥≪鴻篏吾違с緇膓≪鴻茵≪鴻茵篁ュ茵腓冴с筝荀с緇篆<腮荅純с

    篁罕篁潟荀ゃ綵鴻腴ゃ緇ц唇鴻

    罩h頫憗≪号絎

    ed с罩h頫憗篏帥c≪号絎純с/dog/ ≪鴻絎憜茵罨<茵腟茵cdog 帥若潟罎膣≪筝茵祉c憜茵障с罎膣≪帥若潟肴罩≪茵垩≪鴻絎号腓冴憜茵緇「膣≪鴻羈

    . * ^ $ [ ] \( \) \1 \2 ... 祉 sed 篏帥鐚ed 羌茵憗 sed 坂с鐚

    /罩h頫/ ?罩h頫? 篏帥憜茵茵<c罎膣≪<腟茵憜茵障с罎膣≪/罩h頫/ 篏帥c ?罩h頫? 篏帥c憜茵緇罎膣≪с

    ?罩h頫? <罎膣≪潟潟臀≪剛研潟≦菴筝с荀с違<絎鴻

    one
    two
    three
    four
    five
    

    с鐚憜茵c鐚

    > ?three?,?five?p
    

    2 茵 5 茵障с罩c頫腓冴

    > ?three?,?one?p
    

    劫絖茵茲違茵鴻茵腓冴罩h頫憗≪号絎т戎с罎膣≪綽ф膣≪罩≪篏紊眼激с潟絖g茲違茵茵腓冴潟潟罨<菴違鴻 g 潟潟篏帥鴻с

    g 潟潟

    潟潟筝х劫ャ g 潟潟с翫罩h頫憗緇潟潟鴻с潟潟鴻筝潟潟緇ゃ鴻激ワ壕у阪罩h頫憗茵絲障潟潟鴻筝ゅ茵潟潟鴻筝 g сc

    > 1,10g/dog/p\
    p
    

    1 茵 10 茵障ссdog 茵篋よ;腓冴(篋茵c鴻激ャтゃゃc)潟潟鴻筝潟潟筝ゃс障с

    > 1,10g/dog/p
    

    違筝よ;腓冴

    潟潟鴻筝吾潟潟≪鴻臀純с

    > 1,10g/dog/.=
    

    1茵 10 茵障ссdog 茵垩茵腓冴

    <. 篁ュ≪鴻絎с違

    1,10g/dog/5p
    

    1 茵 10 茵障с dog 茵違5 茵絎鴻茵腓冴 dog 茵 3 茵c障c 3 阪鐚吟с鐚

    g 潟潟臀≪鴻ャ翫1,$ 篏帥

    > g/dog/p
    

    憜茵c>賢 dog 茵鴻茵腓冴

    莇潟荐cg 潟潟緇膓罩h頫憗≪鴻絎罩h頫憗筝c阪ャ ed 膺緇筝ゃ泣с

    篋腮蕁

    筝茲違≪鴻絎翫帥潟祉祉潟潟篏帥с帥祉潟潟篏帥c翫緇膓≪鴻茵≪鴻憜茵茹i帥潟篏帥c翫≪鴻茹i憜茵茵≪鴻綏劻

    篋ゃ≪鴻茵垩ф絎翫茵垩茵憜茵箴絖с

    > 1,5p
    > 1;5p
    

    泣ゃ 1 茵 5 茵障с茵腓冴祉絎翫帥祉潟潟篏帥潟冴鐚≪鴻祉絎翫憜茵堺с鐚

    <筝茵憜茵

    > 3,+1p
    

    Invalid address 若篋ょ≪鴻祉у堺≪鴻腓冴с.+ ゃ障憜茵罨<茵茹iс憜茵 1 cс腟絮3,2 緇膀蚊絎cс罸鴻

    3;+1p
    

    篋ょ≪鴻c憜茵茵≪鴻 3 茵с潟潟 3 茵 4 茵障с茵腓冴

    ≪鴻罩h頫憗篏帥翫祉潟潟紊ус

    p 潟潟篋ゃ≪鴻緇筝や札筝絎翫緇篋ゃ≪鴻篏睡菴違p 潟潟с≪鴻筝ゆ絎翫≪鴻阪潟篏帥≪鴻潟阪祉潟潟篏帥違荅宴c

    chapter1
    
    section1
    鐚膃 1 腴膃 1 膀絎刻
    section2
    鐚膃 1 腴膃 2 膀絎刻
    section3
    鐚膃 1 腴膃 3 膀絎刻
    
    chapter2
    
    section1
    鐚膃 2 腴膃 1 膀絎刻
    section2
    鐚膃 2 腴膃 2 膀絎刻
    section3
    鐚膃 1 腴膃 2 膀絎刻
    

    絎鴻<с憜茵 1 茵

    > /chapter2/;/section2/;/section3/-p
    

    膃 2 腴膃 2 膀絎鴻茵腓冴≪鴻憜茵蚊綵合c阪潟篏帥c違膃 1 腴膃 2 膀絎鴻茵腓冴障

    ≪鴻絎 g 潟潟篏窮違茲罎膣≪純

    菴違緇膓≪鴻茵≪鴻篁ュ茵腓冴сゃ帥潟篏帥c翫違

    с筝ゃ膂≦箴憜茵<筝祉罩h頫憗篏帥c≪号絎у「膣≪茵茵垩茵腓冴翫

    1;/dog/=
    

    違鐚 /dog/= 井h頫憗「膣≪憜茵罨<茵紮鐚

    //

    // 緇茵c罎膣≪膵違菴ャ≪緇吾罩h頫憗筝綺ゆс

    ≪号絎篏帥帥憜茵罎膣≪紊c醇сс<絎鴻紊眼 // 筝≪鴻緇

    // ヨ≪号絎篏帥g 潟潟緇膓罩h頫憗篏帥罎膣≪≪号絎筝罩h頫憗c翫絎鴻g 潟潟緇膓罩h頫憗c翫<絎鴻緇篏帥 // c憗

    s 潟潟

    ed 潟潟絲乗院絽吾茵篏с筝絖帥ゃ鴻篆罩c茵篏絲乗院臀潟潟c綽荀臀 s 潟潟鋎帥

    s 潟潟s/old/new/ 綵≪違

    > 1,10s/old/new/
    

    1 茵 10 茵膀蚊茵榊憗 old new 臀

    茵榊憗鴻 old new 臀

    > 1,10s/old/new/g
    

    g 泣c刻・絨乗鐚 g 障с s 潟潟泣c鴻с菴違潟潟 g 障cョс

    s 潟潟泣c鴻倶違сc茵篏臀絎с

    s 潟潟篋ゃ≪鴻臀緇≪鴻筝ゃ筝c翫.,. 筝茹c臀憜茵帥絲障茵

    u х翫絎茵潟潟≪潟ャ

    茵垩ゃ茵腓削n鐚

    わd鐚腱糸鐚m鐚潟種t鐚茵g鐚j鐚茵絲障若鐚j鐚茵垩ゃ茵腓削n鐚緇臀膵違菴鐚s鐚

    若<祉若梧;腓冴違鐚H鐚緇若<祉若吾茵腓削h鐚潟潟潟茵腓冴違鐚P鐚

    r 絎<ゃ絎茵緇菴遵w <ゃ吾吾冴e <ゃ茯粋昭

    r! ゃャ激с潟潟ュ潟潟激су茵罔羣阪絎茵緇茯粋昭障

    q ed 腟篋Q х≧>散腟篋Crl c у巡擦c潟祉сュ≪若違障潟潟≪若

    祉蚊:-)

    ed ユ茯

    馹ゃ腱障茹c絎号荀喝с鴻吾

    綵吟ed 莎桁帥若ユ茯障宴綽荀腱 Linux 罘宴若 ja_JP.eucJP сgnome-terminal 2.4.2 kterm 6.2.0.ext02 ャckterm 祉ユ茯障宴ссed фユ茯宴<鐚 gnome-terminal 茵 2 ゃ鴻若鴻茵腓榊倶筝絎絎c鐚

    馹ed ゃсed 医宴若障潟潟ゃс腱 GNU ed version 0.2 篏帥c潟潟ゃ locale.h ゃ潟若

    荅 ed фユ茯篏帥c帥羲√ 2 ゃ絖罩h頫憗<帥c . 鐚鐚c罩c鋇絖茯茘[ ] 篏帥c絖鴻絎с- 篏帥膀蚊絎翫鐚 [-]鐚絎絖鴻翫障c

    篏茫腱医∝純荀喝сed ュ≪若 2 ゃ絖ュ鴻若鴻篏帥cс違ュ≪若у抗篁ュ鴻若鴻筝若勀羔с筝綺∴昭с鴻若鴻筝若潟潟≪若祉c p 潟潟с茵荀帥筝よ;腓冴篋や戎cュсс

    腱医сュ≪若鴻若鴻翫絖 1 ゃ絖с 2 ゃ絖с 1 ゃ吟ゃl鐚鐚潟潟с荀 \244\242荀 \244\244 с鐚 EUC 茵憗 8 我違с鐚 1 ゃ篋ゃゃ

    絲乗援篏帥

    sed сc ed с膂≦腮蕁膩篏罐ed 潟潟ゃ潟絲乗援

    ed sed <膩絲乗院罔羣ュс膩絲乗院<ゃ篆絖潟潟ゃ鰹 w 潟潟鐚с<ゃ筝祉ed 罔羣ュ潟潟с若<祉若吾罔羣若-s 激с鰹 - 鐚腮<祉若吾罔羣若冴罩≪H 潟潟阪若<祉若吾罔羣若鐚GNU ed ver0.2鐚

    $ cat input.txt
    the first line
    the second line
    the third line
    $ cat command.txt
    1p
    3p
    $ /bin/ed -s input.txt < command.txt > output.txt
    $ cat output.txt
    the first line
    the third line
    

    罧笈遵壕

    筝茵茵違筝絎膀蚊罧笈純筝ф壕腮帥罧笈遵壕ゃ帥

    筝茵絖違荐絎号ャ若腮帥сc吟罧笈初絖筝ゃ鴻若鴻茵憗腮帥

    $;/^[ ]/,$v/^[ ]/-,.j

    т莇潟鐚 [ ] 筝荳1 ゃ 2 ゃゃ鴻若鴻筝ゅャcc鐚膺肢┳障腟茵罨<茵鐚<筝筝茵鐚鴻若鴻у障茵茵腟茵障с<1 ゃ 2 ゃ腥榊純c紮障茵ゃ茵茵g潟с腥榊純у障茵蚊ゃ違No Match 若

    筝鴻<若 LaTeX 腮帥腥肴c罧笈純紜с

    $;/./+,$v/^$/-,.j
    

    違莇潟障腟茵罨<茵鐚<筝筝茵鐚篏絖茵罨<茵腟茵障с絲障腥肴с茵違茵茵篏泣膺肢┳с<筝茵翫≪鴻祉若

    篌若 sed с sed ed 藥cュ篏篆<с若鴻若鴻吾<潟違腓榊茵c

    diff ed

    diff 篋ゃ<ゃ罸莠-e 激с潟篏帥罸莠腟 ed 潟潟祉鴻茯綵≪у阪с鐚篏帥a, c, d 潟潟鐚ed patch сс絎 patch 篏障у

    $ cat old.txt
    This is
    old.
    $ cat new.txt
    This is
    new.
    $ diff -e old.txt new.txt > diff.txt
    $ cat diff.txt
    2c
    new.
    .
    $ (cat diff.txt; echo '1,$p') | /bin/ed -s old.txt
    This is
    new.
    

    ledit ed

    ed с篏帥 readline 荀篏帥ca 潟潟уュ筝茵сc若純祉ゃ水ャ篁ュc潟潟若喝冴絨眼絎茵с ledit 罔羣ュ罔羣阪冴 readline 篏帥c膩若ゃ潟c潟違 Emacs 綣罧綽泣ユ茯篏帥с

    $ ledit ed
    

    ed у茯絽潟篏

    ed 腥罐窮篁鴻茯絽潟膩絖紊綵c茯絽潟筝茵ゃ若帥腴с鴻若潟c帥с絎

    茯絽潟罎膣≪綽荀с蕭с潟潟≪若ュ≪若 ed 羇肢顔≪紊с違篁障уュ茯罎膣≪ ed 篏帥綛吾羂潟 cat 茯篁障ц帥鴻ャ靎≦ /cat 違<c若帥若号潟

    障膂≦茯絽潟罕羆冴箴水<篁ヤ筝箴

    ---By the Ionian Sea---+
    75+
    --ch10
    @2005-12-21
    carry away 域院
    uncouth 膕
    demeanour 腴≦泣障
    
    76+
    exclamation 
    querulous /kw'erul\as/眼c純
    
    drift 紊ф hit the drift of
    by dint of sth. 
    revile 
    77+
    kith and kin 荀蕁膰
    @2005-12-22
    stone-dead 腟吟
    take hold upon sb. 吾
    
    scenic /si:nik/ 絮
    fall foul of sb. 綵c
    @2005-12-25
    ensue 膓莎激
    access () 坂
    
    expectorate: cough or spit out (phelgm) from the throat or lungs
    inmate: 絎壕
    hosterly: (archaic or humorous) in or pub
    ---+
    

    絎篏睡箴遺札筝

                          # 激с ed 莎桁潟 >  
    $ ed -p '> ' words.txt
    1072
    >                     # 篁ヤ激c若у障茵潟<潟
    >                     # 莎桁茵腓冴ゃ違
    >                     # 莎桁憜茵腟茵
    >                     # H с若<祉若吾茵腓冴荐絎
    > H
    >                     # 篏腴綣激c
    > g?^-?p
    ---By the Ionian Sea---+
    --ch10
    ---+
    >                     # 篏若吾茯сcc
    >                     # ( ?  ? с罩h頫憗後罎膣≪
    >                     #   障若悟垩腓冴茵 + хc )
    > ?+$?p
    77+
    >                     # 茯障у緇 5 茵荀帥
    > $-5,$p
    bustle: move energetically or noisily
    *phlegm /flem/ 
    expectorate: cough or spit out (phelgm) from the throat or lungs
    inmate: 絎壕
    hosterly: (archaic or humorous) in or pub
    ---+
    >                     # 障篁ャヤ吾莨若
    > $-r !date +@\%Y-\%m-\%d
    12
    >                     # ヤ吟 12 ゃ水ャ
    >                     # с篁ャ綣激
    >                     # subside c茯帥鴻
    > /subside
    ?
    No match
    >                     # 茯帥鴻
    >                     # subside 吾莨若
    > $i
    subside 鐚宴鐚
    .
    >                     # c罨<若吾
    > a
    78+
    .
    >                     # qualm 吾莨若
    > a
    qualm (a) feeeling doubt or unease about one's behaver
    .
    >                     # 膓眼吟с
    > .w !nkf -w | aspell -l
    feeeling
    56
    >                     # 茯筝 feeling  e 筝紊c
    >                     # (56  ispell 吾阪ゃ)
    >                     # c眼
    > s/eee/ee/
    >                     # 蚊障篆絖
    > w
    1143                  
    >                     # <ゃ泣ゃ冴 1143 ゃc
    >                     #
    >                     # cャ綣激茯緇膺
    > ?^@?;?^@?;/^@/-p
    @2005-12-25
    ensue 膓莎激
    access () 坂
    lank 蚊激
    
    >                     # 篁ヨ帥鴻茯医激
    > $;?^@?;$w !mpage -1 | lpr
    > 76
    >                     # с腟篋
    > q
    $                     # 激с祉c障сс
    
  • 罨≠
    HOME
    
    
    紕膣
    薤藕
    
    茯絖
    沿
    ユ茯
    
    
    遵医