cat 、tac、nl

来源:百度文库 编辑:神马文学网 时间:2024/04/28 03:21:34

NAME

cat - concatenate files and print on the standard output      /// [美] [kɑ:n´kæt?¸neit] v./a.联系

SYNOPSIS

cat[OPTION] [FILE]... 

DESCRIPTION

Concatenate FILE(s), or standard input, to standard output.         ///将一个文件的内容连续输出

-A, --show-all
equivalent to -vET
-b, --number-nonblank
number nonblank output lines
-e
equivalent to -vE
-E, --show-ends
display $ at end of each line
-n, --number
number all output lines
-s, --squeeze-blank
never more than one single blank line
-t
equivalent to -vT
-T, --show-tabs
display TAB characters as ^I
-u
(ignored)
-v, --show-nonprinting                   ///显示看不到的特殊字符
use ^ and M- notation, except for LFD and TAB
--help
display this help and exit
--version
output version information and exit

With no FILE, or when FILE is -, read standard input. 

AUTHOR

Written by Torbjorn Granlund and Richard M. Stallman. 

REPORTING BUGS

Report bugs to

COPYRIGHT

Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

SEE ALSO

The full documentation forcatis maintained as a Texinfo manual. If theinfoandcatprograms are properly installed at your site, the command

info coreutils cat

should give you access to the complete manual.


NAME

tac - concatenate and print files in reverse 

SYNOPSIS

tac[OPTION]... [FILE]... 

DESCRIPTION

Write each FILE to standard output, last line first.With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.

-b, --before
attach the separator before instead of after
-r, --regex
interpret the separator as a regular expression
-s, --separator=STRING
use STRING as the separator instead of newline
--help
display this help and exit
--version
output version information and exit
 

AUTHOR

Written by Jay Lepreau and David MacKenzie. 

REPORTING BUGS

Report bugs to

COPYRIGHT

Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

SEE ALSO

The full documentation fortacis maintained as a Texinfo manual. If theinfoandtacprograms are properly installed at your site, the command

info coreutils tac

should give you access to the complete manual.



 

NAME

nl - number lines of files 

SYNOPSIS

nl[OPTION]... [FILE]... 

DESCRIPTION

Write each FILE to standard output, with line numbers added.With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.

-b, --body-numbering=STYLE
use STYLE for numbering body lines
-d, --section-delimiter=CC
use CC for separating logical pages
-f, --footer-numbering=STYLE
use STYLE for numbering footer lines
-h, --header-numbering=STYLE
use STYLE for numbering header lines
-i, --page-increment=NUMBER
line number increment at each line
-l, --join-blank-lines=NUMBER
group of NUMBER empty lines counted as one
-n, --number-format=FORMAT
insert line numbers according to FORMAT
-p, --no-renumber
do not reset line numbers at logical pages
-s, --number-separator=STRING
add STRING after (possible) line number
-v, --first-page=NUMBER
first line number on each logical page
-w, --number-width=NUMBER
use NUMBER columns for line numbers
--help
display this help and exit
--version
output version information and exit

By default, selects -v1 -i1 -l1 -sTAB -w6 -nrn -hn -bt -fn. CC aretwo delimiter characters for separating logical pages, a missingsecond character implies :. Type \\ for \. STYLE is one of:

a
number all lines
t
number only nonempty lines
n
number no lines
pREGEXP
number only lines that contain a match for REGEXP

FORMAT is one of:

ln
left justified, no leading zeros
rn
right justified, no leading zeros
rz
right justified, leading zeros
 

AUTHOR

Written by Scott Bartram and David MacKenzie. 

REPORTING BUGS

Report bugs to

COPYRIGHT

Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

SEE ALSO

The full documentation fornlis maintained as a Texinfo manual. If theinfoandnlprograms are properly installed at your site, the command

info coreutils nl

should give you access to the complete manual.

 

 

***********************eg************************

[test@zao2 ~]$ nl -b a -n rz -w 3 /etc/issue
001    Fedora release 12 (Constantine)
002    Kernel \r on an \m (\l)
003