grep与管道的问题
发表于 : 2008-05-03 12:51
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa
ERROR! Command line arguments conflict!
Usage 1(to authenticate):
linux1x [authentication options]
authentication options are:
[-u <UserName[/password]>].specify user name and password for authentication.
[-n <NetworkDeviceName>]...specify network card name for authentication, such as eth0,eth1,etc.
[-d] ......................start authentication with daemon mode(background mode).
[-p] ......................start authentication with interactive mode, prompt user to input all the necessary information.
Usage 2(to view network status info):
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
Usage 3(to configure network connection information):
linux1x -c
Usage 4(to stop network connection):
linux1x -k
___________________________________________________________________________________
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'linux1x'
linux1x [authentication options]
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
linux1x -c
linux1x -k
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'linux1x'
linux1x [authentication options]
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
linux1x -c
linux1x -k
___________________________________________________________________________________
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'E'
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'l'
bleastrind@bleastrind-desktop:~$
___________________________________________________________________________________
为什么返回不了第一行?
但是我sudo linux1x -addsa>1
再grep 'E' 1
就行
ERROR! Command line arguments conflict!
Usage 1(to authenticate):
linux1x [authentication options]
authentication options are:
[-u <UserName[/password]>].specify user name and password for authentication.
[-n <NetworkDeviceName>]...specify network card name for authentication, such as eth0,eth1,etc.
[-d] ......................start authentication with daemon mode(background mode).
[-p] ......................start authentication with interactive mode, prompt user to input all the necessary information.
Usage 2(to view network status info):
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
Usage 3(to configure network connection information):
linux1x -c
Usage 4(to stop network connection):
linux1x -k
___________________________________________________________________________________
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'linux1x'
linux1x [authentication options]
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
linux1x -c
linux1x -k
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'linux1x'
linux1x [authentication options]
linux1x -v [LastingTime]..."LastingTime" specifies the lasting time in seconds for this viewing operation(0 or without argument means forever). Also, this command will show the version of this software.
linux1x -c
linux1x -k
___________________________________________________________________________________
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'E'
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'l'
bleastrind@bleastrind-desktop:~$
___________________________________________________________________________________
为什么返回不了第一行?
但是我sudo linux1x -addsa>1
再grep 'E' 1
就行