读书人

ERROR: Unsupported SysV option

发布时间: 2012-08-14 10:39:57 作者: rapoo

ERROR: Unsupported SysV option.

ERROR: Unsupported SysV option.

?

也许有幸,碰到了这个错误提示,不要慌。

请使用eval对字符串重新执行shell解析。

?

例如:

CMND="ps -ef"

$CMND

是可以正常执行地。

?

CMND="ps -ef|grep sshd"

$CMND

就会得到上面的错误了。

因为 "ps -ef|grep sshd" 不会被再次解析,管道符失效。

?

eval $CMND

这样就可以再解析一次。

PS:注意单引号,双引号,转义。

?

?

?

================ 具体错误信息================

ERROR: Unsupported SysV option.
********* simple selection *********? ********* selection by list *********
-A all processes????????????????????? -C by command name
-N negate selection?????????????????? -G by real group ID (supports names)
-a all w/ tty except session leaders? -U by real user ID (supports names)
-d all except session leaders???????? -g by session OR by effective group name
-e all processes????????????????????? -p by process ID
T? all processes on this terminal???? -s processes in the sessions given
a? all w/ tty, including other users? -t by tty
g? OBSOLETE -- DO NOT USE???????????? -u by effective user ID (supports names)
r? only running processes???????????? U? processes for specified users
x? processes w/o controlling ttys???? t? by tty
*********** output format **********? *********** long options ***********
-o,o user-defined? -f full??????????? --Group --User --pid --cols --ppid
-j,j job control?? s? signal????????? --group --user --sid --rows --info
-O,O preloaded -o? v? virtual memory? --cumulative --format --deselect
-l,l long????????? u? user-oriented?? --sort --tty --forest --version
-F?? extra full??? X? registers?????? --heading --no-heading --context
??????????????????? ********* misc options *********
-V,V? show version????? L? list format codes? f? ASCII art forest
-m,m,-L,-T,H? threads?? S? children in sum??? -y change -l format
-M,Z? security data???? c? true command name? -c scheduling class
-w,w? wide output?????? n? numeric WCHAN,UID? -H process hierarchy

1 楼 fujohnwang 2010-07-30 grep sshd < `ps -ef`
也行吧? 2 楼 trydofor 2010-07-30 fujohnwang 写道grep sshd < `ps -ef`
也行吧?

bash-3.00# xxx='grep sshd < `ps -ef`'
-bash-3.00# $xxx
grep: sshd: No such file or directory
grep: <: No such file or directory
grep: `ps: No such file or directory
-bash-3.00# echo $xxx
grep sshd < `ps -ef`
3 楼 trydofor 2010-07-30 -bash-3.00# grep sshd < `ps -ef`
-bash: `ps -ef`: ambiguous redirect

读书人网 >Ruby Rails

热点推荐