shell脚本-1

http://www.runoob.com/w3cnote/shell-scripting.html

filename = "/home/........."错误!不能有空格

--->filename=" "

command >out.txt 2>err.txt:

命令中正确的输出到out.txt,错误信息到err.txt

cat data.txt | cut -d"/" -f2 | sort | uniq -c处理一下文件,取出123.。。。。并且排序、统计次数

[root@localhost ~]# cat data.txt
2015.04.23 21:38:56/123/Jim/Script hanging.
2015.04.23 21:43:50/321/Susane/Mouse was stolen
2015.04.23 21:47:55/123/Jim/Script still not works.
2015.04.23 21:48:16/777/Daniel/I broke my monitor
2015.04.23 22:02:14/123/Jimmy/New script also not working!!!

 
上一篇:Hadoop step by step _ install and configuration environment


下一篇:Android 查看 无wifi/usb设备的logcat方法