我这样做效果很好
utnso@utnso-vm:~$ read command
ps -fea
utnso@utnso-vm:~$ $command
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 23:34 ? 00:00:02 /sbin/init
root 2 0 0 23:34 ? 00:00:00 [kthreadd]
root 3 2 0 23:34 ? 00:00:00 [ksoftirqd/0]
...
但是当试图运行这个命令时它失败了......
utnso@utnso-vm:~$ read command
ps -fea | grep bash
utnso@utnso-vm:~$ $command
ERROR: Garbage 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
...
...
...
...
********* 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
有人知道怎么回事吗??
感谢先进!