Skills
小文兄弟
这个作者很懒,什么都没留下…
展开
-
Sed+Grep 快速替换查找字段
格式: sed -i "s/查找字段/替换字段/g" `grep 查找字段 -rl路径` 命令分解: grep 查找字段 -rl路径 列出”路径”中” 查找字段” 的所有文件 sed –I "s/查找字段/替换字段/g" 在上面”查找列出的文件”(grep命令)中,执行"s/查找字段/替换字段/g" 操作,并将操作的结果作用在“查找列出的文件”源文件上. 注意:红色字符为键盘原创 2011-10-25 20:31:37 · 6035 阅读 · 0 评论 -
(英文)为什么Linux内核中,许多#defines都使用了 do { ... } while(0)?
Why do a lot of #defines in the kernel use do { ... } while(0)? There are a couple of reasons: (from Dave Miller) Empty statements give a warning from the compiler so this is why you see #defin转载 2011-10-26 16:36:23 · 648 阅读 · 0 评论