分享

cat 、tac、nl

 e3399 2010-09-26

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 <bug-coreutils@gnu.org>.  

COPYRIGHT

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

SEE ALSO

The full documentation for cat is maintained as a Texinfo manual. If the info and cat programs 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 <bug-coreutils@gnu.org>.  

COPYRIGHT

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

SEE ALSO

The full documentation for tac is maintained as a Texinfo manual. If the info and tac programs 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 are two delimiter characters for separating logical pages, a missing second 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 <bug-coreutils@gnu.org>.  

COPYRIGHT

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

SEE ALSO

The full documentation for nl is maintained as a Texinfo manual. If the info and nl programs 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    

 


    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多