Linux系统环境:CentOS 5.7 i686
测试文件:cat test.bat

1、系统命令:tac test.bat

2、awk方法: awk '{a[NR]=$0}END{for(i=NR;i>0;i--)print a[i]}' test.bat

3、sed方法: sed '1!G;h;$!d' test.bat

|
背景:
阅读新闻
相关资讯
CentOS教程
|
最新资讯
|