Learning the bash Shell 2nd Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Learning the bash Shell 2nd Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید

B.7 I/O Redirection

Table 2.8 shows a complete list of I/O redirectors. (This table is also included earlier as Table 7.1.) Note that there are two formats for specifying standard output and error redirection: &>file and >&file. The second of these, and the one used throughout this book, is the preferred way.

Table B.8. I/O Redirectors

Redirector

Function

cmd1 | cmd2

Pipe; take standard output of cmd1 as standard input to cmd2

> file

Direct standard output to file

< file

Take standard input from file

>> file

Direct standard output to file; append to file if it already exists

>| file

Force standard output to file even if noclobber is set

n>| file

Force output to file from file descriptor n

even if noclobber set

<> file

Use file as both standard input and standard output

n<> file

Use file as both input and output for file descriptor n

<< label

Here-document

n> file

Direct file descriptor n to file

n< file

Take file descriptor n from file

>> file

Direct file descriptor n to file; append to file if it already exists

n>& ;

Duplicate standard output to file descriptor n

n<& ;

Duplicate standard input from file descriptor n

n>&m

File descriptor n is made to be a copy of the output file descriptor

n<&m

File descriptor n is made to be a copy of the input file descriptor

&>file

Directs standard output and standard error to file

<&-

Close the standard input

>&-

Close the standard output

n>&-

Close the output from file descriptor n

n<&-

Close the input from file descriptor n

/ 104