¼Ð  ÃD: ¥\¯à±j¤jªº UNIX Shell -- ¢ü¢ë¢û¢ð ²¤¶ 
 
=== == === == === == === == === == === == === == === == === == === == === == 
: ¥æ¤j­p¤¤³q°T 77 ´Á (82.4.) ¦³½g¡u¥\¯à±j¤jªº UNIX Shell--tcsh ²¤¶¡v¡C
: ¥Ñ is81026@cis.nctu.edu.tw ©Ò¼g¡C
Âà¸ü©ó¤U....
 
           ¥\¯à±j¤jªº UNIX Shell -- ¢ü¢ë¢û¢ð ²¤¶
                                                       /¦¿®ü·ì
 
 
          Shell,©Ò¿×ªº¡y©R¥O¸ÑĶ¾¹¡z,´£¨Ñ¨Ï¥ÎªÌ©MUNIX¨t²Î®Ö¤ß·¾³qªº¤¶­±µ{¦¡¡C
    ¤@­Ó¹ê¥Î¦Ó¤S¤Íµ½ªºShell¯à°÷Åý¨Ï¥ÎªÌ¨Ï¥Î°_¨Ó±o¤ßÀ³¤â,tcsh´N¬O³o¼Ë¤@­Ó¥\¯à
 ±j¤j¦Ó¤S¤ñ¸û¤Íµ½ªº¤¶­±µ{¦¡,¤×¨ä±qDOS­è¶i¤J¨ìUNIXªº¨Ï¥ÎªÌ¦Ó¨¥§ó¬O¦p¦¹¡C¦]
    ¬°tcsh¤£¦ý¨ã¦³csh©Ò¦³ªº¥\¯à¥~,§ó¦³©R¥O¦C½s­×¡BDOSKEY¡B©R¥O©ÎÀɮפ§§¹¦¨»P
    ·j´Mµ¥³\¦h¥\¯à,¹ï©óºD¥ÎDOSªº¨Ï¥ÎªÌ¦Ó¨¥,µLºÃ¬O¤@¤jºÖ­µ,¦Ó¹ï­ì¨Ó¨Ï¥Îcsh ªº
    ¨Ï¥ÎªÌ¨Ó»¡§ó¬O¦pªê²KÁl,¦ý¬O¦³³\¦h¤H¹ï©ótcshªº¥\¯à¤£¬ÆÁA¸Ñ,§í©Î¬O®Ú¥»¤£ª¾
    ¹Dtcshªº¦s¦b,¦]¦¹§Ú±N¨Ï¥Îtcshªº¸gÅç»P¤j®a¤@°_¤À¨É,§Æ±æ¤j®a¯à°÷¦h§Q¥Îtcsh
    ªº¥\¯à,¨Ï±o¨Ï¥ÎUNIX¦¨¬°¤@¥ó§Ö¼Öªº¨Æ¡C
 
          tcsh´£¨Ñ¤F«Ü¦h·s¥\¯à,¤£¤Î³Æ¸ü¡C¥H¤U§Ú±N¿ï¾Ü´X¶µ­«­n¦Ó¤S¹ê¥Îªº¥\¯à
    »P¤j®a¦@¦P¤À¨É:
 
    1.DOSKEY(Visual History)
      ¥i¥Ñ¤W¤U¥ª¥k¥|­Ó¤è¦VÁä,Æ[¬Ýhistory list¤¤¤§©R¥O¨Ã¥i¥[¥H­×§ï©Î°õ¦æ¡C
      ¨Ò¦p:
        >ls -F
        braver   dragonhose   ryo   tintin*
        >echo "I am Fish!"
        I am Fish!
        >[¡ô]echo "I am Fish!"
 
    ¡°[¡ô]ªí¥Ü«ö¤U¤è¦VÁä ,¥H¤U¥Î¤¤¬A¸¹¬A°_¨Ó¬Òªí¥Ü«ö¤U¤@­Ó«öÁä,¨Ò¦p: [TAB],
      [ESC],¦Ó^ªí¥Ü«öµÛCTRL(Control)Á䤣©ñ,¦A«ö¨ä¥¦Áä,¨Ò¦: [^D]ªí¥Ü«öµÛCTRL
      Á䤣©ñ,¦A«öd¡C
      >ls -F
      «ö¤@¤U Áä,¦AÁä¤Jl,«ö[ENTER]
      -rw-------  1 is81026      362 Apr 20 20:01 barver
      -rw-------  1 is81026      434 Apr 20 20:01 dragonhorse
      -rw-------  1 is81026      341 Apr 20 20:01 ryo
      -rwx------  1 is81026      362 Apr 20 20:01 tintin
 
    2.§¹¦¨©R¥O©ÎÀɦW(Word Completion)
      ¦b¿é¤J©R¥O©ÎÀÉ®×®É,¤£»Ý¿é¤J§¹¾ã¤§©R¥O©ÎÀɦW,¥u»Ý¿é¤J©R¥O©ÎÀɮפ§³¡¥÷¦r¤¸
      ,µM«á«ö[TAB],tcsh±N·|¸Õ¹Ï§ä¥X¤@­Ó°ß¤@²Å¦X§A¿é¤J¦r¤¸ªº©R¥O©ÎÀɮרÃÀ°§A§¹
      ¦¨¥¦¡C­Y¦³¼Æ­Ó²Å¦Xªº©R¥O©ÎÀÉ®×®É,tcsh±N·|À°§A§¹¦¨¦Ü³o¨Ç©R¥O©ÎÀɮתº¦@¦P
      ³¡¥÷,¨Ãµo¥X¡y²¦¡zªº¤@Ánĵ§i§A,¨Ãµ¥«Ý§A¿é¤J¤U¤@­ÓÃѧO¦r¤¸¡C
      ¨Ò¦p¡G¥Ø«e¥Ø¿ý¤U¥]§t¤U¦CÀɮסG
        Makefile        bin       cmd       lib       memos
        Makefile.old    chaos.c   cmtest    mail      networks
        bench.c         class     dev       mbox      socket.c
        Áä¤J¤U¦C©R¥O¡G
        >vi n[TAB]
        «h·|¥X²{
        >vi networks   ½T©w¤§«á,«ö[ENTER]
        ¦]¬°¥u¦³networks²Å¦X²Ä¤@­Ó¦r¥À¬°n¤§±ø¥ó,©Ò¥Htcsh¦Û°ÊÀ°§A§ä¨ì¨Ã§¹¦¨¥¦¡C
        ¦pªGÁä¤J¤U¦C©R¥O¡G
        >vi M[TAB]
        «h·|¥X²{
        >vi Makefile
        ¨Ã¥X²{"²¦"¤@Án,ĵ§i§A¦³¨â­Ó¥H¤WªºÀɮײŦX,¨Ãµ¥«Ý§A½T©w©Î¿é¤J¤U¤@­Ó¿ë
        ÃѦr¤¸¦A«ö[ENTER],¥H«K´M§ä§A·Q­nªºÀɮסC
        >vi Makefile.[TAB]
        >vi Makefile.old
      ©R¥O¥ç¥i,¨Ò¦p:
        >unc[TAB]
        >uncompress
      ­n±±¨îtcsh§¹¦¨ÀɦW©Î©R¥Oªº°Ê§@,¥i¥HÂǵ۳]©w¥H¤U´X­ÓshellÅܼƨӧ¹¦¨:
      (1) recexact:
          ³o­ÓÅܼƬO¥Î¨Ó¨Ïºë½TªºÀɮשΩR¥O³QÂX®i,¦Ó¤£µo¥Xĵ§iÁn¡C
          ¨Ò¦p:
          °²³]¥Ø«e¥Ø¿ý¤U¦³¨â­Ó¤l¥Ø¿ý,foo»Pfood,¦Ó¥Brecexact³o­ÓÅܼƤw³Q³]©w,
          >cd fo[TAB]
          >cd foo[TAB]
          >cd foo/
          ²Ä¤@¦¸«ö¤U[TAB]®É,tcsh±N¨äÂX®i¦¨foo¨Ãµo¥Xĵ§iÁn,¦ý²Ä¤G¦¸¦A«ö¤U[TAB]
          ®É,tcsh·|±N¨äÂX®i¦¨foo/³o­Ó¤l¥Ø¿ý,¦Ó¤£·|µo¥Xĵ§iÁn¡C
          ¨Ò¦p: >set recexact
      (2) autolist:
          ·í³o­ÓÅܼƳQ³]©w,¦Ó¦pªG¦³¼Æ­ÓÀɮשΩR¥O³¡¥÷²Å¦X®É,tcsh·|±N³o´X­Ó¿ï¾Ü
          ¦C¥X,¦A¨Ñ§A¿ï¾Ü¡CÃþ¦ü«ö¤UCtrl-D,½Ð°Ñ¦Ò¤U¤@­Ó¥\¯à»¡©ú¡C
          ¨Ò¦p: >set autolist
      (3) matchbeep:
          ³o­ÓÅܼƬO¥Î¨Ó±±¨î¦ó®Éµo¥Xĵ§iÁn,¤]´N¬O¡y²¦¡zªº¤@Án,¥¦¨ã¦³¤U¦C´X­Ó­È
          ¥i¨Ñ³]©w:
          nomatch: ¬°§ä¥X²Å¦XªºÀɮשΩR¥O®É,µo¥Xĵ§iÁn¡C
          ambiguous: ¦³«Ü¦hÀɮשΩR¥O²Å¦X®É,µo¥Xĵ§iÁn¡C
          notunique: §ä¨ì¤@ºë½T²Å¦Xªº,¦ýÁÙ¦³¨ä¥L¸ûªø¦Ó¥B²Å¦XªºÀɦW©Î©R¥O®É,µo¥X
                     ĵ§iÁn¡C
          never: µL½×¦b¥ô¦ó±¡ªp¤U³£¤£µo¥Xĵ§iÁn¡C
          ¨Ò¦p: >set matchbeep=nomatch
      (4) autoexpand:
          ®Ú¾Ú¨Ï¥ÎªÌÁä¤Jªº¦r¤¸,¦Û°Ê°Ñ¦Òhistory listªº©R¥O,´M§ä¨Ã±N¨äÂX®i¦¨²Ä¤@
          ­Ó²Å¦Xªº©R¥O¡C
          ¨Ò¦p: >set autoexpand
      (5) autocorrect:
          ¦pªG³o­ÓÅܼƳQ³]©w,tcsh·|®Ú¾Ú¥i¯à¤§Àɮ׸ô®|,´À§A§ó¥¿¥i¯àªº¿ù»~¡C
          ¨Ò¦p: >set autocorrect
 
    3.©R¥O©ÎÀɮפ§·j´M(List Possible Word)
      ¦C¥X«e´X­Ó¦r¤¸²Å¦X§A©ÒÁä¤J¦r¤¸ªº©R¥O©ÎÀɮסC
      ¨Ò¦p:
      (1) ¥Ø«e¥Ø¿ý¤U¤§ÀÉ®×»P2.¬Û¦P
          >vi c[^D]
          chaos.c     class      cmd*     cmtest/
          «ö¤U[^D]«á,tcsh·|¦C¥X©Ò¦³c ¶}ÀYªºÀɮסC
          Àɮ׫ᤧ¯S®í²Å¸¹¤À§Oªí¥Ü¦UºØ©Ê½è¤£¦PªºÀÉ®×:
          /  -> ¥Ø¿ý(Directory)           |  -> §Ç¦C(Queue)
          *  -> °õ¦æÀÉ(Executable file)   %  -> ¦r¤¸³]³ÆÀÉ(Character Device)
          @  -> Symbolic link             #  -> °Ï¶ô³]³ÆÀÉ(Block Device)
          =  -> Socket
      (2) >b[^D]
          b2g         bbfig       beach-ball2    biff             bitmap
          bar         bc          bg             bind             bmtoa
          basename    bdftopcf    bggen          bindkey          break
          bash        bdftops     bgplot         bindkey-command  breaksw
          batch       beach-ball  bibtex         bison            builtins
          ±N·|¦C¥X©Ò¦³¥Hb ¶}ÀYªº©R¥O¤Î¥Ø«e¥Ø¿ý¤U¥Hb ¶}ÀYªºÀɮסC
      (3) >~[^D]
          ±N·|¦C¥X¥Ø«e¨t²Î©Ò¦³ªº±b¸¹(login name)¡C
      (4) >cd /usr/op[^D]
          >cd /usr/openwin/
          ±N·|¦C¥X²Å¦X¤§¸ô®|¡C
 
    4.©R¥O¦C½s­×(Command Line Editing)
      tcsh´£¨ÑÃþ¦üGNU Emacs©ÎVIªº±±¨îÁä¨Ó­×§ï¥Ø«e©R¥O¦C¤§©R¥O,¨ä¹w³]­È¬°¨Ï¥Î
      GNU Emacsªº±±¨îÁä,¦ý¬O¨Ï¥ÎªÌ¥i§Q¥Îbindkey©R¥O±N±±¨îÁä§ï¬°VI¼Ò¦¡,©Î¬O¨Ì
      ¦U¤H¤§³ß¦n©w¸q¥X¦Û¤v»{¬°¤è«Kªº±±¨îÁä¡C
      Ãö©ó GNU Emacs »P VI¤§±±¨îÁä©w¸q½Ð¬d¬ÛÃö¸ê®Æ¡C
 
      * ©w¸q¦Û¤vªº±±¨îÁä
          ¨Ï¥ÎªÌ¥i§Q¥Îbindkey©R¥O,¨Ó©w¸q¦Û¤v»Ý­n©ÎºD¥Îªº±±¨îÁä,©Î¬O±N¬Y­Ó«öÁä
          ©w¸q¦¨±`¥ÎªºUNIX©R¥O,¬Æ¦Ü³s¨Ï¥ÎªÌ±`¥Îªº¦r¦ê¥ç¥i©w¸q¡C
          »yªk: bindkey [-a] [-c] [-s] [-v] [-e] [-d] [-k] [-l] [-r] [--]
                        [[in-string | key-name][out-string | command]]
          »¡©ú: -a :
                -s : «ü©w¿é¥X¥Î¬Y¤@¦r¦ê¨ú¥N,¦Ó«D°õ¦ætcsh©Ò´£¨Ñ¤§±±¨î©R¥O,Ãþ
                     ¦üaliasªº¥\¯à¡C
                -c : «ü©w¿é¥X¥Î¬Y¤@UNIX©R¥O¨ú¥N¨Ã¥[¥H°õ¦æ¡C
                -v : ±N±±¨îÁä©R¥O¹ï·Ó¤è¦¡³]¬°VI¼Ò¦¡¡C
                -e : ±N±±¨îÁä©R¥O¹ï·Ó¤è¦¡³]¬°Emacs¼Ò¦¡¡C
                -k :
                -d :
                -l : ¦C¥X¥i«ü©w¤§±±¨î©R¥O¡C
                -r : ±N¬Y¤@¤w©w¸q¤§±±¨îÁä²¾¥h¡C
          ¨Ò¦p:
            >bindkey "[HOME]" beginning-of-line
            ±N[HOME]³o­ÓÁä©w¸q¬°²¾¦Ü¤@¦æ¤§¶}ÀY,¥H«á·í§A¦b°µ©R¥O¦C½s­×®É,«ö¤U
            [HOME],´å¼Ð´N·|²¾¦Ü¸Ó©R¥O¦C¤§¶}ÀY¡C
 
            >bindkey -r "[HOME]"
            ±N[HOME]³o­ÓÁ䪺©w¸q²¾¥h¡C
            >bindkey -s "^F" I_am_Fish!
            ±NCtrl-F©w¸q¬°I_am_Fish!³o­Ó¦r¦ê,·í§A«ö¤U¸ÓÁä®É,¿Ã¹õ¤W·|Åã¥Ü¥X
            I_am_Fish!³o­Ó¦r¦ê¡C
 
            >bindkey -s "^X" ls -alF
            ±NCtrl-F©w¸q¬°°õ¦æls -alF³o­ÓUNIX©R¥O¡C
 
 
    5.¶g´Á©Ê©R¥O¤§°õ¦æ(Periodic Command Execution)
      Âǵ۳]©wshellÅܼÆtperiod»P¥N¦W(alias)periodic,¥i°õ¦æ¶g´Á©Ê¤§©R¥O¡C
      »yªk: set tperiod=
            alias periodic 
      »¡©ú:  ®É¶¡¶¡¹j,¥H¤ÀÄÁ¬°³æ¦ì¡C
               ±ý°õ¦æ¤§©R¥O¡C
      ¨Ò¦p:
      >set tperiod=30
      >alias periodic checknews
      tcsh±N·|¨C¹j30¤ÀÄÁ°õ¦æchecknews³o­Ó©R¥O¤@¦¸¡C
 
    6.®É¶¡©Ê¨Æ¥ó¦Cªí(Timed Event List)
      tcsh´£¨Ñ¤F¤@­Ó©R¥Osched,Åý§A¯à¦b¨C¤Ñ¯S©wªº®É¶¡°õ¦æ¬Y­Ó©R¥O,¨ä¥\¯àÃþ¦ü
      UNIX¤W­ì¦³¤§crontabªº¥\¯à¡C
      »yªk: (1)sched [+]hh:mm 
            (2)sched
            (3)sched -
      »¡©ú: (1)[+]hh:mm   ±ý°õ¦æ©R¥O¤§®É¶¡,+ªí¥Ü¹L¤F¤¤¤È12:00,©Î¥i§Q¥Î'am'©Î
                          'pm'¨Ó«ü©w,¨Ò¦p:8:00ªí¥Ü¦­¤W8:00,¥ç¥i¥Î8:00am¨Óªí¥Ü,
                          ¦Ó+3:30ªí¥Ü¤U¤È3:30,¥ç¥i¥Î3:30pm¨Óªí¥Ü¡C
                 ±ý°õ¦æ¤§©R¥O¡C
            (2)¤£¥[¥ô¦ó°Ñ¼Æ,«h¦C¥X¤w«ü©w®É¶¡¤§©R¥O¡C
            (3)¥Î¥H¥h°£¬Y¤@¤w³]©w¤§©R¥O,ªí¥Ü¸Ó©R¥O¦blist¤¤¤§½s¸¹¡C
      ¨Ò¦p:
      (1)>sched 11:50 echo It\'s time to eat lunch.
         >sched 5pm set prompt='[%h] It\'s after 5; go home: >'
         ©ó¦­¤W11:50¦b¿Ã¹õ¤W¦L¥XIt's time to eat lunch.,¦Ó¦b¤U¤È5:00®É,±N´£¥Ü
         ²Å¸¹(prompt)§ï¬°[26] It's after; go home: >,26¬O¸Ó©R¥Ohistory list¤¤
         ªº¸¹½X¡C
      (2)>sched
             1  Wed Apr  4 15:42  /usr/lib/uucp/uucico -r1 -sother
             2  Wed Apr  4 17:00 set prompt=[%h] It's after 5; go home: >
         >
         ±N·|¦C¥X¥Ø«e©Ò¦³¥H³]©w®É¶¡»P©R¥Oªº¹ï·Óªí¡C
      (3)>sched -3
         Not that many scheduled events.
         >sched -2
         >sched
             1  Wed Apr  4 15:42  /usr/lib/uucp/uucico -r1 -sother
         >
         ±Nscheduled listªº²Ä¤G¶µ²¾¥h¡C
 
    7.¦Û°ÊÂ_½u©ÎÂê¦í¿Ã¹õ(Automatic Logout/Locking)
      ·í§A§Ñ°Ologout©Îidle¤Ó¤[®É,tcsh·|®Ú¾Ú§A©Ò³]©wªº®É¶¡´À§Alogout©Îlock§Aªº
      ¿Ã¹õ,¨Ï§AªºÀɮפ£·|³Q¨ä¥Lªº¤H«§ï©Î§R°£¡C³]©wªº¤èªk¬O§Q¥ÎÅܼÆautologout
      ¨Ó³]©w§A©Ò§Æ±ælogout©Îlock¿Ã¹õªº®É¶¡¡C
      »yªk: set autologout=
            set autologout=( )
      »¡©ú:  §Æ±æidle´X¤ÀÄÁ¤§«á¦Û°Êlogout,¹w³]­È¬°60¤ÀÄÁ¡C
               §Æ±æidle´X¤ÀÄÁ¤§«á¦Û°Êlock,µL¹w³]­È¡C
      ¨Ò¦p:
      (1)>set autologout=30
         tcsh·|¦b§Aidle30¤ÀÄÁ«áÅã¥Üauto-logout¨Ã¦Û°ÊÀ°§Alogout¡C
      (2)>set autologout=(20 3)
         °£¤F¦b§Aidle20¤ÀÄÁ«á,tcsh¦Û°ÊÀ°§Alogout¤§¥~,§A¨Cidle3¤ÀÄÁ,tcsh·|±N¿Ã¹õ
         lock¦í,¨Ã¸ß°Ý§A±K½X,¦b±K½X¿é¤J¿ù»~¤­¦¸¤§«á,tcsh·|¦Û°ÊÀ°§Alogout,¥H«OÅ@
         §AÄ_¶Qªº¸ê®Æ¡C
 
    8.Æ[¬Ý¤W½uª¬ªp(Watching for Logins and Logouts)
      ¦³ªº¤H¨C¦¸¤W½u®É,³£·|§Q¥Îrusers©Îwho«ü¥O¨ÓÆ[¬Ý¬O§_¦³»{ÃѪº¤H¦b½u¤W,µM«á
      ¦A¤©¥L(¦o)¥æ½Í(talk),¦ý¤@ª½¥Îrusers©Îwho¨Ó¬Ý¦ü¥G¦³ÂI³Â·Ð,²{¦b³o¨Ç¤H¦³ºÖ
      ¤F,¦]¬°tcsh´£¨Ñ¤F¥i¥HÅý§A¨C´X¤ÀÄÁ´Nª¾¹D¥L(¦o)¬O§_¤w¸g¤W½uªº¥\¯à¡C³o­Ó¥\
      ¯à¬O§Q¥Î³]©w¯S®íªºshellÅܼƨӹF¦¨ªº¡C
      »yªk: set watch=(     ....)
      »¡©ú:  ®É¶¡¶¡¹j,¥H¤ÀÄÁ¬°³æ¦ì,¬Ù²¤®É,¹w³]­È¬°10¤ÀÄÁ¡C
                 ¨Ï¥ÎªÌ±b¸¹¡C
              ¨Ï¥ÎªÌ©Ò¦bªº²×ºÝ¾÷¡C
            ¦¹¥~,ÁÙ¦³¤@¯S®íªº¦r'any',¥i¥Î¨Ó«ü©w©Ò¦³ªº¨Ï¥ÎªÌ©Î²×ºÝ¾÷¡C
      ¨Ò¦p:
      (1) >set watch=(sys ttyp0 root console)
          tcsh·|¦V¨Ï¥ÎªÌ³qª¾¦b²×ºÝ¾÷/dev/ttyp0¤W¬O§_¦³sys login©Îlogout,ÁÙ¦³¥D
          ±±¥x(console)¤W¬O§_¦³root login©Îlogout¡C
      (2) >set watch=('b*' any any ttyp5)
          tcsh·|¦V¨Ï¥ÎªÌ³qª¾¦b³o³¡¾÷¾¹ªº¥ô¤@­Ó²×ºÝ¾÷¤W¬O§_¦³¥Hb¬°¶}ÀYªº±b¸¹
          login©Îlogout,ÁÙ¦³¦b²×ºÝ¾÷/dev/ttyp5¤W¬O§_¦³¥ô¦ó¤@­Ó¨Ï¥ÎªÌlogin©Î
          logout¡C
      (3) >set watch=(any any)
          tcsh·|¦V¨Ï¥ÎªÌ³qª¾¦b³o³¡¾÷¾¹ªº¥ô¤@­Ó²×ºÝ¾÷¤W¬O§_¦³¥ô¦ó¤@­Ó¨Ï¥ÎªÌ
          login©Îlogout¡C
      (4) >set watch=(40 any any)
          ¨C¹j40¤ÀÄÁ,tcsh·|¦V¨Ï¥ÎªÌ³qª¾¦b³o³¡¾÷¾¹ªº¥ô¤@­Ó²×ºÝ¾÷¤W¬O§_¦³¥ô¦ó¤@
          ­Ó¨Ï¥ÎªÌlogin©Îlogout¡C
 
    9.·s´£¥Ü²Å¸¹®æ¦¡(New Prompt Format)
      ¦b³]©w´£¥Ü²Å¸¹¤è­±,tcsh§Q¥Î"%"©w¸q¤F³\¦h·sªº®æ¦¡,¨Ò¦p:®É¶¡¡B©Ò¦b¥Ø
      ¿ýµ¥¡CÃþ¦üC»y¨¥¤¤printf¨ç¼Æªº¥Îªk¡C³o¨Ç²Å¸¹ªº·N¸q½Ð§Q¥Î man ©R¥O¬d¸ß¡C
 
      ½d¨Ò:
      >set prompt="%m [%h] %U[%@]%u [%/] you rang? "
      cissun10 [26] [11:35pm] [/usr/accts/sys] you rang? _
 
 
«á°O: ¥»¤H¤~²¨¾Ç²L,¤å¤¤­Y¦³¥ô¦ó¿ù»~,½Ð¦U¦ì¤£§[½ç±Ð¡C
      E-mail Address: is81026@cis.nctu.edu.tw ¸ê°T¬ì¾Ç¨t ¦¿®ü·ì
 
=== == === == === == === == === == === == === == === == === == === == === == 
 
µo«H¤H: alva@cis_nctu (al), «H°Ï: Unix
¼Ð  ÃD: Re: ½Ð°Ý¦³¨S¦³¤H¥Î¹L tcsh ?
µo«H¯¸: ¥æ¤j¸ê¬ì¨t_BBS (Oct 11 22:51:20 1993)
Âà«H¯¸: cis_nctu
 
==>[Author]: "jsshue" on board 'Unix'
> :       ¦ü¥G¨S¬Ý¹L¦³¤H°Q½× tcsh ?
> :       ½Ð°Ý¦³¨S¦³¤H¥Î¹L³o­Ó shell ?
> :       ¥i§_´y­z¤@¤U³o shell ªº¯SÂI,
> :       ­È¤£­È±o¬°¤§±Ë±ó csh ©O ?
 .. 
> ¥H¨Ï¥Î¦Ó¨¥,tcsh «Ü¤è«K!!¦ý¼gshell script ´N¤ñ¤£¤W sh °Õ!!
> ¦ýcsh ©M tcsh ³£«Ü¬Ûcªº»yªk,¬Ý¬Ý´N·|¼gtcsh shell script ¤F!!
> sh«h¬O´¶¹M©Ê»Pshell script ªº¯à¤OÀu©ótcsh&csh!!
 
  UNIX ªº shell ¦³¨â¤j¥D¬y, ¤@ ¬° Bourne shell: 
/bin/sh  ¤@¬° csh  /bin/csh. ¦¹¤G shells ¤w¦ÑÁÚ,
¦ý·¥¦³Åv«Â. ¤À§OÁc­l¤£¤Ö«á¥N. ¦ý sh ªº¤l®]¦ü¸û¦h.
¦p ksh, zsh, bash, ¬Ò«Ü¬¡ÅD. ¦Ó csh ¤§«á¥N¦ü¶È 
tcsh ¸ûµÛ¦W. ¦WµÛ "Life with UNIX" §@ªÌDon Libes ´£°_
»¡, "¦³«Ü¦h¤H¨âÃþshell³£¥Î. ¥Îsh¼gscript, ¥Îcsh°µ
interactive shell." "csh¸¹ºÙ¼Ò­ÀC»y¨¥, ¥i¬O¼g
script ªº¤H[¥L­Ì·íµM¤j³£³£¬O C ªº¦æ®a], ©¹©¹Ä±
±oÁÙ¬O sh ¦n¥Î"
 
  tcsh ¬O csh ªº superset. ¦³ tcsh ¥i¥Î, ·íµM§ï¥Î
tcsh. ¦pªG¬O²ßºD sh ªº¤H, ¥i¥H§ï¥Î GNU ªº¦nªF¦è
bash (Bourne again shell). §¹¥þ¤£¥Î¥ô¦ó³]©w´N¦³ doskey
¨ººØ¥\¯à¤F. ¦h´r§Ö. ÁÙ¦³ºØºØ©_§®¥\¯à, »¡¤§¤£ºÉ.
(man page ¦@ 2451 ­¶!)
 
  ¦ýInternet ¤W°e shell script µ¹¤H¥Îµ´¤j¦h¼Æ¤´¥Î sh 
¼g. ¥¿¬OµÛ²´©ó¨ä³Ì´¶¹M, ¬°UNIX¥@¬É¥ô¦ó¾÷¾¹¤W¤§µ´¹ï
¦s¦bª«. 
  
  ÁÙ¨S¶}©lª± UNIX, ´N·| C ¤F. ¦ýª± UNIX ¦Ü¤µ¤´ 
¤@ª½¿Ëªñ sh ®a±Úªº¤H. ¦]¬°§Ú¬Oª± Linux ¤~¹ï UNIX
µo¥Í¯u¥¿ªº¿³½ìªº. (¥i¥H¹L¹L¤p¤p super user ªºÅ}),
¦ÓLinux¤Wªº¼Ð·Çshell ¥¿¬O bash. ¦A¥[¤W«á¨ÓŪ¤F¸g¨å
K&P ªº The Unix Programming Environment ®ÑÁö¦Ñ, ¨ä±Òµo©Ê
«o¾ú¤[À±·s. ¥Lªº script ³£¬O¥Îsh¼gªº.
 
  ¤S: ¼g GNU ªº³nÊ^ªº°ª¤â­Ì¯u¬O¤@¸s¤j¦n¤H. ¤j®a¦h¦h¤ä«ù.
¥L­Ìªº³nÊ^«D±`¦n¥Î. ¥i¦Ü ftp.edu.tw  UNIX/GNU ¬Ý¬Ý.
 
=== == === == === == === == === == === == === == === == === == === == === ==