设置管道命令的优美性


15

我需要执行一组更改了尼斯级别的“管道”命令。例:

nice -n 15 command1 | command2 | command3

在这种情况下,仅将command1的好感更改为“ 15”。如何更改整个命令集(command1,command2和command3)?

Answers:


18
 nice -n 15 sh -c "command1 | command2 | command3"

这设置了子外壳的精美性,命令1..3继承了它。


13
nice -n 15 command1 | nice -n <num> command2 | nice -n <num> command3

nice 与其他任何命令都没有区别。


0

exec command{1..26} 将所有编号为“ command1”的命令一直运行到“ command26”

nice -n 15 $(pgrep command) 在其中运行任何带有“命令”的进程


command很可能只是一个占位符。
剧情
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.