摘要: 看例子:[root@localhost tmp]# sed '=' test.txt1tsttst tsttsttst2west gao3west abces[root@localhost tmp]# sed = test.txt | sed 'N;s/\n/\t/'1 tsttst tsttsttst2 west gao3 west abces[root@localhost tmp]# N的解释:N:Add a newline to the pattern space, then append the next line of input to the p.. 阅读全文
posted @ 2013-01-09 17:56 健哥的数据花园 阅读(5788) 评论(0) 推荐(0)
摘要: 总算在网上找来一个相对简单的例子。验证如下:[root@localhost tmp]# cat test.txttsttst tsttsttstwest gaowest abces[root@localhost tmp]# egrep "w(es)t.*\1" test.txtwest abces[root@localhost tmp]# grep "w(es)t.*\1" test.txtgrep: Invalid back reference[root@localhost tmp]# grep -E "w(es)t.*\1" te 阅读全文
posted @ 2013-01-09 17:42 健哥的数据花园 阅读(9532) 评论(0) 推荐(0)
摘要: 网络上的文章,多数讲的是把 Linux当作 samba 服务器,换句话说,就是从windows来访问linux上的目录和打印机。有些时候,我们可能需要从linux上来访问 Windows 上的文件和打印机,这是是把linux当作 samba的客户端。故此备忘!windows 已经提供了 smba 服务,参见:http://msdn.microsoft.com/en-us/library/windows/desktop/aa365233(v=vs.85).aspx我们要做的,就是如何使用之。以CentOS5.8为例:一,从linux访问 Windows 文件: 1. windows 机器上的设定 阅读全文
posted @ 2013-01-09 13:11 健哥的数据花园 阅读(8273) 评论(0) 推荐(0)