C-shell - " " /P 2.1 C-shell 1988 C-shell. , C- shell, . 1. C-shell - - - . - - , ( ) , - ( ) - . . . , - - C-shell []. C-shell - - . - C-shell , - . C-shell: C - shell - (- ""). - csh, C-shell. csh : . , - , . , - . . ( C-shell), ( C-shell). 1.1. C-shell C-shell , (, /bin/cat), csh (, cd), C-shell (, while). - 3 - - . , , - . - , , .. . , - , ( ), csh. csh - : , - . - , csh. , : ; ( ) <&lt; >&gt; & | , , - \. , ; \, , ';' , . - - , . C-shell. ! # $ % : * , ? [ ] { } @ ~ . ^ \ - . "" , . csh , , - : "" '' `` . - \. , , \. , , csh, . - 4 - , (- ), . - . - ? . * ! ~ . , , - . - . - C- shell csh: alias endsw logout suspend alloc eval newgrp switch bg exec nice time break exit nohup umask breaksw fg notify unalias case foreach onintr unhash cd glob popd unlimit chdir goto pushd unset continue hashstat rehash unsetenv default history repeat wait dirs if set while echo jobs setenv else kill shift end limit source endif login stop csh: argv history nonomatch status cdpath home notify time checktime ignoreeof path verbose child mail prompt cwd noclobber savehist echo noglob shell - , csh. - . , time - , - time , - . - 5 - 1.2. , - csh .   (\n) - . , , , . - . csh . , . , pr -2 -w39 -l24 -t file file , 39 24 . pr ( /bin) . pr , . , . , file, - pr. pr , : ; ( - /bin); . csh ( - ). , - . , , - . , ;, : cat <&lt; file ; pr -2 -w39 -l24 -t file : - 6 - file , , pr . && ||, : cat <&lt; file && pr -2 -w39 -l24 -t file , - , .. file . cat <&lt; file1 || pr -2 -w79 -l24 -t file , , file1 .   - - , . - . . , , - - , : ls -l; ( cat <&lt; f1 && cat <&lt; f2 ) && date , - , , date. - csh - , ;, &&, |, ||, -. , . , . - , . |, : cat -n <&lt; file | pr -2 -w39 -l24 -t cat file ( n), pr . . sort file | cat -n | pr -2 -w39 -l24 >&gt;>&gt; file2 sort ; cat - ; pr - file2. - 7 - && ||, , ;, : ( cat <&lt; f1 && date ) && ( cat -n <&lt; f1 | sort ); date f1, , - , cat, , . . f1 , - . - , . . . & , - , : cat -n <&lt; f1 | pr -2 -w39 -l24 -t >&gt; f2 & cat , pr - , f2. , . (DEL) - , . /W (CTRL/W) . /U (CTRL/U) . cd, popd pushd. - ( - cwd), , dirs. pushd popd . cd . 1, . popd cd __2 , .. - , - . __1 , . popd + __(1+) , . . - 8 - pushd - 1. pushd - cd __2 . ___2 , ___1 - ( ). pushd cd , , . pushd + cd ___(1+). ___(1+) ,  , - . . 1.3. , - . , - , - . : - - ; - / . () - , () - . () . . (- ) : <&lt;, <&lt;<&lt;, <&lt;<&lt;  , ( ). () - : >&gt; >&gt;>&gt; | >&gt;& >&gt;>&gt;& |& >&gt;! >&gt;>&gt;! >&gt;&! >&gt;>&gt;&! , ( ). & , , . ! , - 9 - . - - noclobber, noglob nonomatch. - , -. set unset. : set noclobber unset noclobber : <&lt; _ , - ; <&lt;<&lt;  - . , . : cat >&gt; file <&lt;<&lt; mmm 0123 3456 6789 mmm cat file . mmm. mmm, file. mmm, file - . mmm . - . : >&gt; _ . >&gt;! _ noclobber. , (, /dev/tty*). , file1 file2 set noclobber - 10 - cat <&lt; file2 >&gt; file1 , cat <&lt; file2 >&gt;! file1 . noclobber , - . >&gt;!, >&gt;>&gt;!, >&gt;&! >&gt;>&gt;&! . >&gt;& _ >&gt;&! _ , - , noclobber. >&gt;>&gt; _ >&gt;>&gt;! _ . , , - , noclobber. >&gt;>&gt;& _ >&gt;>&gt;&! _ csh , , - noclobber. . noglob. : _.. noglob, . , - , noclobber. . |&. , - ( ), - . , cat <&lt; file1 |& pr -w79 -l24 >&gt; file2 ( ), pr file2. 1.4. , - . - - 11 - , , csh. , - - . - . - : . - ps - . - . , , , fg, bg, stop, kill, notify. - - - . : () - ; () () ; ; ; - ; ; . . , jobs jobs -l. - . jobs , : - 12 - [1] cc -c *.o [2] - make install [3] + red file [4] sort file >&gt; result & [5] mx -q -N -u -s *.m >&gt; out & - . . - - : % %+ ; %- ; % ; % ; %?? . , &. , /C (CTRL/C). , /\ (CTRL/\). core. core , - , /\. . , , - /S (CTRL/S), , /Q (CTRL/Q). , , /Z (CTRL/Z), - fg %. - - . - , . , /Z csh, /S . . - , /Z, - 13 - bg. . - , &. []  - - , - . , - stop %_ stop % stop % . , - : 1 sort file >&gt; /tmp/result & 2 cc *.c >&gt;& errors & 3 lint *.c >&gt;& mymsg & : stop %1 stop %sort; - stop %2 stop %c; - stop %3 stop %li, stop %?mymsg?. - , fg bg . - : %_ & % & bg %_ bg % fg %_ & fg % & : %_ % fg %_ fg % ( - ) . - 14 - , . : kill -KILL %_ kill -KILL % kill -KILL __ suspend, /Z . - . , stty tostop tostop, - - . . : stty tostop cat <&lt; file & [1] 285 jobs [1] + ( ) cat <&lt; file , fg %1 fg %cat tostop, stty -tostop kill . kill: kill -l ; kill % kill % TERM () ; kill __ TERM ; - 15 - kill -SIG  SIG . , ( /usr/include/signal.h SIG). - ( ). notify, , . notify : notify - ; unset notify - ; notify % - . 32- , . - : cputime , ; filesize , ; datasize ( + ) sbrk(2) ; stacksize ; coredumpsize , . limit, - unlimit. - , cputime, k - m - . cputime ss - , m - , h - . . : - 16 - limit cputime 1m (1 ) limit cputime 05:30 (5 30 ) limit filesize 2m ( 2 ) 1.5. *, ?, [, ], {, } ~ (), - . - , , . , . - . * . - , echo * , echo */*/f* - , f. ? . : % ls f.? f.c f.o f.s , f, - - . [_] - . : % ls f.[cso] f.c f.o f.s [-] - . : - 17 - % ls f.[a-z] f.c f.o f.s , - . ~ () , ls -l ~ , - . - . ~__ . : % ls ~ . {___} . : % ls f.{c,s,o} f.c f.o f.s 1{___}2 1    2. . . 1 / 2 . : % ls aaa{ddd,ccc,bbb}eee aaadddeee aaaccceee aaabbbeee .   , ls . - , , - : - 18 - % echo {,,,,,}   , : %echo {,,}{' ',' '}       . ., . - \. , . , - , . - . , , - nonomatch. - , csh , . , , f.1, f.2 f.3. echo f.[4- 9], : echo: . set nonomatch; echo f.[4-9] : f.[4-9]. echo . f.[4-9], . , - . 1.6. C-shell : , , , . , - (, ) , C-shell - 19 - , . set (, @ a = 5). - , $. ?, # - . : ; - ; , - . . , comfile aaa bbb ccc ddd - comfile. , - , $0 - comfile, $3 - ccc. . % set a = 5 % echo a a % echo $a 5 $ , \. : % set a = 5 % echo \$a $a % echo $a 5 , , $, : - 20 - % set a = 5 % echo \$a $a % echo "\$a" \5 % set b = ", , $a." % echo $b , , 5. % % set b = ", , \$a." % echo $b , , \5. , - , $ , : % set a = 5 %set b = ', , $a.' % echo $b , , $a. % % set b = ', , \$a.' % echo $b , , \$a. , () , $ - . - ,