none-bugs :) ( man find )

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
iblicf
帖子: 3766
注册时间: 2007-01-15 17:15

none-bugs :) ( man find )

#1

帖子 iblicf » 2007-12-24 21:18

代码: 全选

NON-BUGS
       $ find . -name *.c -print
       find: paths must precede expression
       Usage: find [-H] [-L] [-P] [path...] [expression]

       This happens because *.c has been expanded by the shell result-
       ing in find actually receiving a command line like this:

       find . -name bigram.c code.c frcode.c locate.c -print

       That command is of course not going to work.  Instead of  doing
       things this way, you should enclose the pattern in quotes:
       $ find . -name '*.c' -print
今天偶尔查看 find manual 找个参数用法,看到上边这一节,把我逗笑了, 我的确多次的遇到过这样子的提示,我倒没觉得 bug , 有点疑惑,也没深究,(不求甚解阿) ... 原来是 soso

呵呵,估计作者收到无数这样子的抱怨,不得不站出来给自己澄清一下了,cute
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#2

帖子 bones7456 » 2007-12-25 9:29

呵呵,这个确实有必要澄清一下,很容易误解的
关注我的blog: ε==3
回复