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
就行
grep与管道的问题
-
- 帖子: 32
- 注册时间: 2007-08-26 7:23
- laborer
- 帖子: 1016
- 注册时间: 2005-10-25 11:15
- 联系:
但这不能解释为什么error不是标准输出。
也许楼主最后弄错了,试试下面的命令是什么效果但是我sudo linux1x -addsa>1
再grep 'E' 1
就行
代码: 全选
sudo linux1x -addsa 2>&1 | grep 'E'
hreiser@oakland:~$ killall -9 wife
police@oakland:~$ sudo find / -user hreiser
court@oakland:~$ sudo mv /home/hreiser /jail/
court@oakland:~$ sudo usermod -d /jail/hreiser -s "/usr/sbin/chroot /jail/" hreiser
police@oakland:~$ sudo find / -user hreiser
court@oakland:~$ sudo mv /home/hreiser /jail/
court@oakland:~$ sudo usermod -d /jail/hreiser -s "/usr/sbin/chroot /jail/" hreiser
-
- 帖子: 32
- 注册时间: 2007-08-26 7:23
-
- 帖子: 32
- 注册时间: 2007-08-26 7:23
-
- 帖子: 1331
- 注册时间: 2006-07-09 12:22
- 来自: 南京
哦,我大意了,这也许与文件描述符关系不大。
楼主命令的输出中的"ERROR.."行,据上面的结果来看,并不是错误输出。所以使用文件描述符2也没有用。
再,楼主用 commmand > 1,则是将输出导入到名为"1"的文件里,所以grep时有结果。
但楼主的这几种情况对照看,应该是矛盾的。
单看这两行:
前一个有输出,后一个没有,这个不太可能。除非同一个命令相同参数,前后两次结果不同,请楼主确认一下。
楼主命令的输出中的"ERROR.."行,据上面的结果来看,并不是错误输出。所以使用文件描述符2也没有用。
再,楼主用 commmand > 1,则是将输出导入到名为"1"的文件里,所以grep时有结果。
但楼主的这几种情况对照看,应该是矛盾的。
单看这两行:
代码: 全选
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'linux1x'
bleastrind@bleastrind-desktop:~$ sudo linux1x -addsa|grep 'l'
-
- 帖子: 32
- 注册时间: 2007-08-26 7:23
就是那样的..
我也不知道为啥,这是最大的令人迷惑的地方
-
- 帖子: 32
- 注册时间: 2007-08-26 7:23
我知道怎么回事了
是因为时间差。。
怎么才能等写完文件再执行下一步呢?
怎么才能等写完文件再执行下一步呢?