当我输入i3 --help时,我得到了以下输出:
Usage: i3 [-c configfile] [-d all] [-a] [-v] [-V] [-C]
-a disable autostart ('exec' lines in config)
-c <file> use the provided configfile instead
-C validate configuration file and exit
-d all enable debug output
-L <file> path to the serialized layout during restarts
-v display version and exit
-V enable verbose mode
--force-xinerama
Use Xinerama instead of RandR.
This option should only be used if you are stuck with the
old nVidia closed source driver (older than 302.17), which does
not support RandR.
--get-socketpath
Retrieve the i3 IPC socket path from X11, print it, then exit.
--shmlog-size <limit>
Limits the size of the i3 SHM log to <limit> bytes. Setting this
to 0 disables SHM logging entirely.
The default is 0 bytes.
If you pass plain text arguments, i3 will interpret them as a command
to send to a currently running i3 (like i3-msg). This allows you to
use nice and logical commands, such as:
i3 border none
i3 floating toggle
i3 kill window对于我到目前为止遇到的任何其他命令,这样一个--help选项的输出总是可以由第二个命令(如grep或cat )进行管道和解析,并且我验证了它在这里工作。
你知道为什么i3 --help的输出不是这样的吗?我对文件描述符很在行,但我觉得这与它们有关。然而,我不知道该去哪里看看。
发布于 2019-12-25 08:26:46
可能此命令将输出发送到STDERR。你可以用这样的方式实现它:
i3 --help 2>&1|grep string此2>&1将将STDERR (文件处理程序2)的输出重定向到STDOUT (文件处理程序1)。
https://unix.stackexchange.com/questions/558862
复制相似问题