【问题标题】:AIX format descriptors for ps command on SolarisSolaris 上 ps 命令的 AIX 格式描述符
【发布时间】:2021-11-24 14:48:07
【问题描述】:

有什么方法可以更改 Solaris 上 ps 命令输出的分隔符​​?

在 linux 上,我可以轻松地使用 AIX 格式描述符,但在 Solaris 上找不到类似的东西。

【问题讨论】:

  • 对于Unix & Linux,这是一个比 Stack Overflow 更好的问题。

标签: linux shell unix command-line solaris


【解决方案1】:

您可以使用选项-o。这是page的小摘录:

-o 格式

Prints information according to the format specification given in format. This is fully described in DISPLAY FORMATS. Multiple -o

可以指定选项;格式规范被解释为 所有格式的空格字符分隔的串联 选项参数。 它与 AIX 不完全一样,但您可以调整输出。

要更改分隔符,只需使用 sed 或 awk 命令

【讨论】:

    猜你喜欢
    • 2012-04-30
    • 2011-03-10
    • 1970-01-01
    • 2017-11-18
    • 2018-04-11
    • 2012-12-15
    • 1970-01-01
    • 2011-09-02
    • 1970-01-01
    相关资源
    最近更新 更多