.


:




:

































 

 

 

 


. , shell', , . shell'. :

` ~! @ # $ % ^ & * () _ [ ] { }:; ' " / \ > <

, shell - , , . :

1. (\) (- escape). , , , (.. : \\). :

grep lucky\*star my\ file # lucky*star my file

, .

2. ("). - quote. , . . . :

grep "lucky*star" "my file" #

, , . . , echo "hello, \slash" echo "hello, \\slash" : hello, \slash.

3. (- quote). . :

# $1000 my income

grep '$1000' "my income"

# '$' , .

. echo 'hello, \\slash' hello, \\slash.

, - . : >

:

# , "loruser" /etc/passwd

# "myfile" "" .

grep loruser /etc/passwd >~//myfile

, : . , . , , ( ). : 2>

:

> __ 2> __

:

grep loruser /etc/passwd >~//myfile 2>~//myerrors

( , ). , .

, , "" . :

>> #

2>> #

, : , ?

. , , . , .

, , :

<

, :

< __ > __

, , . , , .

 

|

(). , , , ( , ) "|". , |, , |.

, , , , - , . , . , - , |, ;. , , .

 

( ), , ( - ). - cat, more, less, wc, cmp, diff, .

 

 

5.1. -

grep, fgrep, egrep , ,
tr , ,
comm 3 : , 1 , , 2- : ,
pr
sed , ( )

tee, "" , , ( ). , tee 1>&file.

, , , , , .

* , () . * . * , , .

? . , , 12 9- . : Chapter1, Chapter2, Chapter5, Chapter9, Chapter11, ls ? , "Chapter" :

$ ls Chapter?

, shell , . , : cat, fat, mat, rat. [crf], shell , ``c'', ``r'', ``f'' .

, . : chapter1, chapter2, chapter3, chapter4, chapter5, chapter6. chapter[1-5], shell chapter1 chapter5. . [A-Z], shell , [a-z] - .

 

( &)

, , , shell . , . , , . , . . : - , () , , . - . , .

:

command &

 



<== | ==>
|
:


: 2018-10-18; !; : 198 |


:

:

, .
==> ...

1903 - | 1672 -


© 2015-2024 lektsii.org - -

: 0.016 .