123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- shell_patterns=0
- + ! t t
- @ ÀĞÔØ İÕè⪠İĞÔ âÕÚãûŞÜ ÔĞâŞâÕÚŞÜ
- CMD=%{ÃİÕáØâÕ İĞàÕÔÑã}
- $CMD %f
- + t t
- @ ÀĞÔØ İÕè⪠İĞÔ Ş×İĞçÕİØÜ ÔĞâŞâÕÚĞÜĞ
- set %t; CMD=%{ÃİÕáØâÕ İĞàÕÔÑã}
- while [ -n "$1" ]; do
- $CMD "$1"
- shift
- done
-
- 0 ÃàÕÔØ ßàØøĞÒã ÓàÕèÚÕ Ø ßŞèĞùØ øÕ ĞÔÜØİØáâàĞâŞàã
- ${EDITOR-vi} /tmp/mail.$$
- test -r /tmp/mail.$$ && mail root < /tmp/mail.$$
- rm -f /tmp/mail.$$
- =+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r
- 1 ¿àØÚĞÖØ ÔĞâŞâÕÚã ã× ßŞÜŞû roff -man
- nroff -man %f | less
- 2 ¿Ş×ŞÒØ çØâĞç åØßÕàâÕÚáâĞ info
- info
- = t d
- 3 ºŞÜßàØÜãø âÕÚãûØ ßŞÔÔØàÕÚâŞàØøãÜ (tar.gz)
- Pwd=`basename "%d" /`
- echo -n "½Ğ×ØÒ ÚŞÜßàØÜŞÒĞİÕ ÔĞâŞâÕÚÕ (ÑÕ× ÒàáâÕ) [$Pwd]: "
- read tar
- if [ "$tar"x = x ]; then tar="$Pwd"; fi
- cd .. && \
- tar cf - "$Pwd" | gzip -f9 > "$tar.tar.gz" && \
- echo "´ĞâŞâÕÚĞ ../$tar.tar.gz øÕ áâÒŞàÕİĞ."
- 4 ºŞÜßàØÜãø âÕÚãûØ ßŞÔÔØàÕÚâŞàØøãÜ (tar.bz2)
- Pwd=`basename %d /`
- echo -n "½Ğ×ØÒ ÚŞÜßàØÜŞÒĞİÕ ÔĞâŞâÕÚÕ (ÑÕ× ÒàáâÕ) [$Pwd]: "
- read tar
- if [ "$tar"x = x ]; then tar="$Pwd"; fi
- cd .. && \
- tar cf - "$Pwd" | bzip2 -f > "$tar.tar.bz2" && \
- echo "´ĞâŞâÕÚĞ ../$tar.tar.bz2 øÕ áâÒŞàÕİĞ."
- = f \.c$ & t r
- + f \.c$ & t r & ! t t
- 5 ¿àÕÒÕÔØ Ø ßŞÒÕÖØ âÕÚãûã ÔĞâŞâÕÚã ÒàáâÕ `.c'
- make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f
- + t r & ! t t
- a ½ĞÔŞÒÕÖØ ÔĞâŞâÕÚã İĞ Şİã Ø× ÔàãÓŞÓ ŞÚİĞ
- cat %f >>%D/%f
- + t t
- A ½ĞÔŞÒÕÖØ ÔĞâŞâÕÚÕ İĞ ŞİÕ Ø× ÔàãÓŞÓ ŞÚİĞ
- set %t
- while [ -n "$1" ]; do
- cat $1 >>%D/$1
- shift
- done
- + t r & ! t t
- d ¾ÑàØèØ ÔĞâŞâÕÚã ĞÚŞ úÕİĞ ÚŞßØøĞ ßŞáâŞøØ ã ÔàãÓŞÜ ŞÚİã.
- if [ "%d" = "%D" ]; then
- echo "´ÒĞ ÔØàÕÚâŞàØøãÜĞ ÜŞàĞøã ÔĞ ÑãÔã àĞ×ÛØçØâØ"
- exit 1
- fi
- if [ -f %D/%f ]; then # if two of them, then
- if cmp -s %D/%f %f; then
- rm %f && echo %f: ¾±À¸Á°½°
- else
- echo "%f Ø %D/%f áÕ àĞ×ÛØÚãøã: ½¸¨µ ŞÑàØáĞİĞ"
- echo -n "¿àØâØáİØâÕ `RETURN' "
- read âĞáâÕà
- fi
- else
- echo %f: ½ÕÜĞ ÚŞßØøÕ ã %D/%f: ½¸¨µ ŞÑàØáĞİĞ.
- fi
- + t t
- D ¾ÑàØèØ Ş×İĞçÕİÕ ÔĞâŞâÕÚÕ ĞÚŞ ߪáâŞøØ ÚŞßØøĞ ã ÔàãÓŞÜ ŞÚİã.
- if [ "%d" = "%D" ]; then
- echo "´ÒĞ ÔØàÕÚâŞàØøãÜĞ ÜŞàĞøã ÔĞ ÑãÔã àĞ×ÛØçØâØ"
- exit 1
- fi
- for i in %t
- do
- if [ -f %D/$i ]; then
- SUM1="`sum $i`"
- SUM2="`sum %D/$i`"
- if [ "$SUM1" = "$SUM2" ]; then
- rm $i && echo ${i}: ¾±À¸Á°½°
- else
- echo $i Ø %D/$i áÕ àĞ×ÛØÚãøã: ½¸¨µ ŞÑàØáĞİĞ.
- fi
- else
- echo %f İÕÜĞ ÚŞßØøã ã %D/%f: ½¸¨µ ŞÑàØáĞİĞ.
- fi
- done
- m ¿ŞÓÛÕÔĞø áâàĞİØæã ãßãâáâÒĞ
- MAN=%{ÃİÕáØâÕ İĞ×ØÒ ãßãâáâÒĞ}
- %view man -P cat $MAN
- = f \.gz$ & t r
- + ! t t
- n ¿àÕÓÛÕÔĞø ÔĞâŞâÕÚã ÒÕáâØ ÚŞÜßàØÜŞÒĞİã ßàŞÓàĞÜŞÜ gzip
- dd if=%f bs=1 skip=12|zcat|${PAGER-more}
- # assuming the cunbatch header is 12 bytes long.
- = t r &
- + ! t t
- h ÁÚØİØ ×ĞÓÛĞÒùĞ Ø× âÕÚãûÕÓ çÛĞİÚĞ ÒÕáâØ
- CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null
- case $CHECK in
- Newsgroups:|Path:)
- cp %f /tmp/%f.$$ && sed '/^'"$CHECK"' /,/^$/d' /tmp/%f.$$ > %f
- [ "$?" = "0" ] && rm /tmp/%f.$$
- echo %f: ãÚÛŞúÕİŞ ×ĞÓÛĞÒùÕ
- ;;
- *)
- echo %f İØøÕ çÛĞİĞÚ ÒÕáâØ.
- ;;
- esac
- + t t
- H ÁÚØİØ ×ĞÓÛĞÒùĞ Ø× Ş×İĞçÕİØå çÛĞİĞÚĞ ÒÕáâØ
- set %t
- while [ -n "$1" ]; do
- CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null
- WFILE=/tmp/${1}.$$
- case $CHECK in
- Newsgroups:|Path:)
- cp $1 $WFILE && sed '/^'"$CHECK"' /,/^$/d' $WFILE > $1
- if [ "$?" = "0" ]; then
- rm $WFILE; echo $1 ×ĞÓÛĞÒùÕ ãÚÛŞúÕİŞ. à àÕÔã.
- else
- echo "Ããßá! ¼ŞÛØÜ ÔĞ ßàŞÒÕàØâÕ $1 áĞ $WFILE"
- fi
- ;;
- *)
- echo $1 ßàÕáÚŞçÕİĞ: ½ØøÕ çÛĞİĞÚ ÒÕáâØ.
- ;;
- esac
- shift
- done
- = t r
- + ! t t
- r ºŞßØàĞø ÔĞâŞâÕÚã İĞ ãÔĞùÕİŞÓ ÔŞÜĞûØİĞ
- echo -n "½Ğ ÚŞÓ ÔŞÜĞûØİĞ?: "
- read ´ŞÜĞûØİ
- echo -n "Ã ÚŞøØ ÔØàÕÚâŞàØøãÜ İĞ $´ŞÜĞûØİ?: "
- read ´Øà
- rcp -p %f ${´ŞÜĞûØİ}:$´Øà
- + t t
- R ºŞßØàĞø ÔĞâŞâÕÚÕ İĞ ãÔĞùÕİŞÓ ÔŞÜĞûØİĞ (ÑÕ× ßàŞÒÕàÕ ÓàÕèĞÚĞ)
- echo -n "½Ğ ÚŞÓ ÔŞÜĞûØİĞ ÔĞ ÚŞßØàĞÜ ÔĞâŞâÕÚÕ?: "
- read ´ŞÜĞûØİ
- echo -n "Ã ÚŞøØ ÔØàÕÚâŞàØøãÜ İĞ $´ŞÜĞûØİ? :"
- read ´Øà
- rcp -pr %u ${´ŞÜĞûØİ}:$´Øà
- = f \.tex$ & t r
- + f \.tex$ & t r & ! t t
- t ¿ŞÚàÕİØ »ĞÂÕÅ İĞÔ ÔĞâŞâÕÚŞÜ Ø ßàØÚĞÖØ øÕ ßàÕÚŞ ßàŞÓàĞÜĞ `xdvi'
- latex %f && xdvi `basename %f .tex`.dvi
- =+ f ^part | f ^Part | f uue & t r
- + t t
- U ÃãÔÕÚŞÔØàĞø Ş×İĞçÕİØ çÛĞİĞÚ ÒÕáâØ (âàÕÑĞÛŞ ÑØ àĞ×àĞÔØâØ)
- set %t
- (
- while [ -n "$1" ]; do # strip headers
- FIRST=`awk '{print $1 ; exit}' $1`
- cat $1 | sed '/^'"$FIRST"' /,/^$/d'; shift
- done
- ) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode
- if [ "$?" != "0" ]; then
- echo "½Õ ÜŞÓã ÔĞ ÔÕÚŞÔØàĞÜ %t"
- fi
- echo "¼ŞÛØÜ ÔĞ ßàŞÒÕàØâÕ Ø×ÛĞ×İã ÔĞâŞâÕÚã ßàÕ ÑØÛŞ ÚĞÚÒŞÓ ÑàØáĞúĞ"
- =+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.Z$| f \.tar\.bz2$ & t r
- x ¸×ÔÒŞø áĞÔàÖĞø ÚŞÜßàØÜŞÒĞİÕ ÔĞâŞâÕÚÕ ÒàáâÕ `tar'
- unset EXT
- case %f in
- *.tar.bz2) EXT=tar_bz2;;
- esac
- if [ "$EXT" = "tar_bz2" ]; then
- bunzip2 -c %f | tar xvf -
- else
- gzip -dc %f | tar xvf -
- fi
- = t r
- + ! t t
- y ¿ĞÚãø ØÛØ àĞáß. âÕÚ. ÔĞâ. ßàŞÓàĞÜØÜĞ `gzip' ØÛØ `gunzip'
- unset DECOMP
- case %f in
- *.gz) DECOMP=-d;;
- *.[zZ]) DECOMP=-d;;
- esac
- gzip $DECOMP -v %f
- + t t
- Y ¿ĞÚãø ØÛØ àĞáß. Ş×İĞç. ÔĞâ. ßàŞÓàĞÜØÜĞ `gzip' ØÛØ `gunzip'
- for i in %t
- do
- unset DECOMP
- case $i in
- *.gz) DECOMP=-d;;
- *.[zZ]) DECOMP=-d;;
- esac
- gzip $DECOMP -v $i
- done
- + ! t t
- b ¿ĞÚãø ØÛØ àĞáß. âÕÚ. ÔĞâ. ßàŞÓàĞÜØÜĞ `bzip2' ØÛØ `bunzip2'
- unset DECOMP
- case %f in
- *.bz2) DECOMP=-d;;
- esac
- bzip2 $DECOMP -v %f
- + t t
- B ¿ĞÚãø ØÛØ àĞáß. Ş×İĞç. ÔĞâ. ßàŞÓàĞÜØÜĞ `bzip2' ØÛØ `bunzip2'
- for i in %t
- do
- unset DECOMP
- case $i in
- *.bz2) DECOMP=-d;;
- esac
- bzip2 $DECOMP -v $i
- done
- + f \.tar.gz$ | f \.tgz$ | f \.tpz$ | f \.tar.Z$ | f \.tar.z$ | f \.tar.bz2$ | f \.tar.F$ & t r & ! t t
- z ¸×ÔÒŞø ÚŞÜßàØÜŞÒĞİã ÔĞâŞâÕÚã ÒàáâÕ `tar' ã ߪÔÔØàÕÚâŞàØøãÜ
- unset D
- set gzip -cd
- case %f in
- *.tar.gz) D="`basename %f .tar.gz`";;
- *.tgz) D="`basename %f .tgz`";;
- *.tpz) D="`basename %f .tpz`";;
- *.tar.Z) D="`basename %f .tar.Z`";;
- *.tar.z) D="`basename %f .tar.z`";;
- *.tar.bz2) D="`basename %f .tar.bz2`"; set bunzip2 -c ;;
- *.tar.F) D="`basename %f .tar.F`"; set freeze -dc;
- esac
- mkdir $D; cd $D && ($1 $2 ../%f | tar xvf -)
- + t t
- Z ¸×ÔÒŞø ÚŞÜßàØÜŞÒĞİã ÔĞâŞâÕÚÕ ÒàáâÕ `tar' ã ߪÔÔØàÕÚâŞàØøãÜÕ
- for i in %t
- do
- set gzip -dc
- unset D
- case $i in
- *.tar.gz) D="`basename $i .tar.gz`";;
- *.tgz) D="`basename $i .tgz`";;
- *.tpz) D="`basename $i .tpz`";;
- *.tar.Z) D="`basename $i .tar.Z`";;
- *.tar.z) D="`basename $i .tar.z`";;
- *.tar.F) D="`basename $i .tar.F`"; set freeze -dc;;
- *.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
- esac
- mkdir $D; (cd $D && $1 $2 ../$i | tar xvf -)
- done
- + f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
- c ¿àÕÑĞæØ gz<->bz2, tar.gz<->tar.bz2 Ø tgz->tar.bz2
- unset D
- case %f in
- *.tgz) EXT=tgz;;
- *.tpz) EXT=tpz;;
- *.Z) EXT=Z;;
- *.z) EXT=z;;
- *.gz) EXT=gz;;
- *.bz2) EXT=bz2;;
- esac
- case $EXT in
- tgz|tpz) D="`basename %f .$EXT`.tar";;
- gz|Z|z) D="`basename %f .$EXT`";;
- bz2) D="`basename %f .bz2`";;
- esac
- if [ "$EXT" = "bz2" ]; then
- bunzip2 -v %f ; gzip -f9 -v $D
- else
- gunzip -v %f ; bzip2 -v $D
- fi
- + t t
- C ¿àÕÑĞæØ gz<->bz2, tar.gz<->tar.bz2 Ø tgz->tar.bz2
- set %t
- while [ -n "$1" ]
- do
- unset D
- case $1 in
- *.tgz) EXT=tgz;;
- *.tpz) EXT=tpz;;
- *.Z) EXT=Z;;
- *.z) EXT=z;;
- *.gz) EXT=gz;;
- *.bz2) EXT=bz2;;
- esac
- case $EXT in
- tgz) D="`basename $1 .tgz`.tar";;
- tpz) D="`basename $1 .tpz`.tar";;
- gz|Z|z) D="`basename $1 .$EXT`";;
- bz2) D="`basename $1 .bz2`";;
- esac
- if [ "$EXT" = "bz2" ]; then
- bunzip2 -v $1
- gzip -f9 -v $D
- else
- gunzip -v $1
- bzip2 -v $D
- fi
- shift
- done
- + x /usr/bin/open | x /usr/local/bin/open & x /bin/sh
- o ¾âÒŞàØ áÛÕÔÕûã áÛŞÑŞÔİã ÚŞİתÛã
- open -s -- sh
|