我有一个相当长的bash脚本。我想用nice来运行它
不错。/test1.scr
如果我不使用nice运行脚本,它会工作得很好。但是当我用nice运行它的时候。在我的脚本中运行的命令失败。
commandout=()
while IFS= read -r line # Read a line
do
commandout+=("$line") # Append line to the array
done < <(tmsh show ltm pool $pool detail | grep -A5 "Ltm::Pool")
commandout+=(" ")如果我用nice运行这个脚本,我会得到以下错误
./test1.scr: line 269: syntax error near unexpected token `<'
./test1.scr: line 269: ` done < <(tmsh show ltm pool $pool detail | grep -A5 "Ltm::Pool")'如果我不能很好地运行脚本,一切工作正常。
我想改善整个脚本,这样我就可以在运行时减少对其他进程的影响
发布于 2017-08-19 07:29:58
您没有发布为答案,因此我无法将其标记为答案。但是天哪,我真是太傻了。
脚本以#/bin/bash启动,而不是修复它的#!/bin/bash。
https://stackoverflow.com/questions/45766104
复制相似问题