易截截图软件、单文件、免安装、纯绿色、仅160KB

linux正则表达式 grep egrep用法


&&
命令1 && 命令2     如果这个命令1执行成功& &那么执行这个命令命2
mv myfile myfile2 && echo "if you are seeing this then mv was success!"
|| 
如果| |左边的命令(命令1)未执行成功,那么就执行| |右边的命令(命令2)
mv myfile myfile2 && echo "if you are seeing this then mv was success! "
从一个审计文件中抽取第1个和第2个域,并将其输出到一个临时文件中,如果这一操作未成功,我希望能够收到一个相应邮件:
awk '{print$1,$2}' test3 >test2 || echo "sorry the extraction didn't work " | mail root
(命令1;命令2;. . .)
如果使用{ }来代替(),那么相应的命令将在子s h e l l而不是当前s h e l l中作为一个整体被执行,只有在{ }中所有命令的输出作为一个整体被重定向时,其中的命令才被放到子s h e l l中执行,否则在当前s h e l l执行。
例子:
如果s o r t命令执行成功了,可以先将输出文件备份,然后再打印
test.sorted && (cp test.sorted test.sorted_bak ;lp test.sorted)
经常使用的正则表达式举例
^                                 行首
$                                 行尾
^ [ t h e ]                      以t h e开头行
[ S s ] i g n a [ l L ]              匹配单词s i g n a l、s i g n a L、S i g n a l、S i g n a L
[Ss]igna[lL]".                同上,但加一句点
[ m a y M A Y ]             包含m a y大写或小写字母的行
^ U S E R $      &n


相关文档:

linux kernel: HZ, tick and jiffies

http://linux.chinaunix.net/bbs/archiver/tid-985372.html
Linux Kernel: 简介HZ, tick and jiffie
               
Linux[/b]核心幾個重要跟時間有關的名詞或變數,底下將介紹HZ[/b]、tick與jiffies。
......

通过ssh转发X访问Linux无头工作站

无论微软如何专注于桌面,X的设计还是能让他们汗颜。比较一下Windows远程桌面(2008Server终于有所改进)和X转发的效果就可以理解,为什么*nix的世界里显示GUI环境依靠的竟然是Server-Client架构。
在Windows下,只要实现两个要素就可以实现X的转发:1.X Server服务;2.ssh客户端。前者可以用Xming,后者可以用putty或openS ......

linux 常用命令整理

tar 文件与目录压缩命令
tar [-cxtzjvfpPN] 文件与目录 ....
参数:
-c :建立一个压缩文件的参数指令(create 的意思);
-x :解开一个压缩文件的参数指令!
-t :查看 tarfile 里面的文件!
特别注意,在参数的下达中, c/x/t 仅能存在一个!不可同时存在!因为不可能同时压缩与解压缩。
-z :是否同时具有 gzip 的 ......

understanding linux usb ehci device driver(2)

understanding linux usb ehci device driver(2)
understanding linux usb ehci device driver(2)
lm_tom@163.com
2. linux ehci device driver(ehci hcd)
2.1. linux usb subsystem arch overview(host)
2.2. ehci_hcd
2.3. ehci 实现的接口
2.3.1. ehci_pci_setup() (hc_driver->reset)
2.3.2. ehci_run() ( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号