首页
学习
活动
专区
圈层
工具
发布

命令i3
EN

Unix & Linux用户
提问于 2019-12-25 08:19:50
回答 1查看 143关注 0票数 2

当我输入i3 --help时,我得到了以下输出:

代码语言:javascript
复制
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选项的输出总是可以由第二个命令(如grepcat )进行管道和解析,并且我验证了它在这里工作。

你知道为什么i3 --help的输出不是这样的吗?我对文件描述符很在行,但我觉得这与它们有关。然而,我不知道该去哪里看看。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-12-25 08:26:46

可能此命令将输出发送到STDERR。你可以用这样的方式实现它:

代码语言:javascript
复制
i3 --help 2>&1|grep string

2>&1将将STDERR (文件处理程序2)的输出重定向到STDOUT (文件处理程序1)。

票数 3
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/558862

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档