“Shell 命令”的版本间的差异

来自wrc's Wiki
跳到导航 跳到搜索
(建立内容为“== 例子 == === 同时运行几个命令 === 使用 xargs。 <syntaxhighlight lang=bash> ls dir | xargs -P4 -L1 cargo run --release </syntaxhighlight> 实时…”的新页面)
 
第13行: 第13行:
 
watch -n 1 'pgrep -x cargo | xargs -L1 cmdof'
 
watch -n 1 'pgrep -x cargo | xargs -L1 cmdof'
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
<code>cmdof</code> 见我的 [https://github.com/weirane/scripts/blob/b3b501d0e1e95607975e50d10c97591cb76126e8/cmdof scripts] 仓库。
  
 
== 另见 ==
 
== 另见 ==

2021年5月14日 (五) 03:03的版本

例子

同时运行几个命令

使用 xargs。

ls dir | xargs -P4 -L1 cargo run --release

实时查看正在运行哪些命令:

watch -n 1 'pgrep -x cargo | xargs -L1 cmdof'

cmdof 见我的 scripts 仓库。

另见