.


:




:

































 

 

 

 


bash




, , . ' UNIX, . , , (, ), . .

6.1.8 " "

" " (<<) ( ) - . , . ϳ << , - . :

$ cat << zzz

> This line will be printed

>zzz

This line will be printed

$

6.1.9

, . ѳ "&&" "". , "&&", , ( 0). :

% cp hello.c hello.bak && rm hello.c

hello.c , , cp .

"||" - "". , "||", , ( 0). :

% cp hello.c hello.bak || echo Copy file error

, Copy file error.

6.1.10 - exec

exec ( , , ) , ' .

, .

6.1.11

bash 䳺 . , . ' .

(=). . . :

$ greeting="How do you do?"

. () $. . ' . :

$ echo $greeting

How do you do?

set. - , unset.

6.1.12

echo, - read. read . , ( ) - - . :

$ read greeting

How do you do

$ echo $greeting

How do you do

, " " .





:


: 2015-09-20; !; : 446 |


:

:

: , .
==> ...

1729 - | 1688 -


© 2015-2024 lektsii.org - -

: 0.011 .