grep "$1"的作用是什么[xxxx@localhost ~]$ /bin/ps -ef|grep grep
xxxx 16166 2433 0 11:03 pts/0 00:00:00 grep grep
[xxxx@localhost ~]$ /bin/ps -ef|grep "$1"|grep grep
xxxx 16199 2433 0 11:14 pts/0 00:00:00 grep
xxxx 16200 2433 0 11:14 pts/0 00:00:00 grep grep
求教/bin/ps -ef|grep "$1"|grep grep和/bin/ps -ef|grep grep的区别
-
- 帖子: 71
- 注册时间: 2014-04-28 14:33
- 系统: ubuntu12¢os6
求教/bin/ps -ef|grep "$1"|grep grep和/bin/ps -ef|grep grep的区别
-
- 帖子: 229
- 注册时间: 2007-07-01 17:36
- 系统: (En):System
- 来自: (En):address
- 联系:
Re: 求教/bin/ps -ef|grep "$1"|grep grep和/bin/ps -ef|grep grep的
$1 在双引号里会引起变量expansion, 就是$1 变量啦.
我觉得那行就没用, 除了加个grep 进程.
我觉得那行就没用, 除了加个grep 进程.
---
regards,
Kent
regards,
Kent
-
- 帖子: 71
- 注册时间: 2014-04-28 14:33
- 系统: ubuntu12¢os6
Re: 求教/bin/ps -ef|grep "$1"|grep grep和/bin/ps -ef|grep grep的
就是不明白怎么过滤出grep grep的哦sk1418 写了:$1 在双引号里会引起变量expansion, 就是$1 变量啦.
我觉得那行就没用, 除了加个grep 进程.