我有一個相當長的bash腳本。我想用漂亮的 不錯的運行./test1.scr 如果我不漂亮運行腳本,它的偉大工程。但是,當我運行它很好。在我的腳本中運行的命令失敗。 commandout=()
while IFS= read -r line # Read a line
do
commandout+=("$line") # Append line to the array
done
我有一個運行一些作業的bash腳本。有時我希望能夠通過nice運行這些作業來降低它們在服務器上的優先級。 例如,如果我的可執行文件是a.out,我可以從終端nice a.out運行以降低作業優先級。 在我的bash腳本中,我有一個變量NICE。我做了以下兩件事情之一: # either nice is set
NICE="nice"
# or it is left unset
NICE="
我有這些功能在我的.bashrc中使用的功能(這是一個字符串PARAM): # This function just untar a file:
untar()
{
tar xvf $1
}
# This function execute a command with nohup (you can leave the terminal) and nice for a low p