|
发表于 2003-3-17 10:08:06
|
显示全部楼层
最简单的方法,呵呵
[root@localhost root]# tac <<EOF
> a
> b
> c
> d
> e
> EOF
e
d
c
b
a
[root@localhost root]# tac --help
Usage: tac [OPTION]... [FILE]...
Write each FILE to standard output, last line first.
With no FILE, or when FILE is -, read standard input.
-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
Report bugs to <bug-textutils@gnu.org>.
[root@localhost root]# |
|