1
我得充满了这种采样值的文本文件:插入变量值成柱:分离
1:0:0:Monitoring stuff with Zabbix/OCS:24 HOURS
所以我想换第二场与一个变量。我试图做到这一点:
#!/bin/bash
PRIOR="Priority = 1 - Must have | 2 - Nice to have | 3 - Interesting | 0 - Not interesting"
while read -r line;
do
echo $line
echo $PRIOR
echo -n "Set your priority: "
read SETP</dev/tty
echo "Priority defined: "$SETP
<change my 2nd column value with $SETP>
done < courses.txt
不错,谢谢你glenn回答和代码审查,我会在我的下一个脚本中注意到这一点。 – bgomes06