Below script getting executed on RHEL 9 but not getting executed in RHEL8
COL1=$(echo "$FS_USAGE"|awk '{print $1 " "$7}')
COL2=$(echo "$FS_USAGE"|awk '{print $6}'|sed -e 's/%//g')
for i in $(echo "$COL2"); do
{
if [ $i -ge 95 ]; then
COL3="$(echo -e $i"% $CCOLOR\n$COL3")"
elif [[ $i -ge 85 && $i -lt 95 ]]; then
COL3="$(echo -e $i"% $WCOLOR\n$COL3")"
else
COL3="$(echo -e $i"% $GCOLOR\n$COL3")"
fi
}
done
COL3="$(echo "$COL3"|sort -k1n)"
paste <(echo "$COL1") <(echo "$COL3") -d' ' | column -t
While executing the script getting below error.
sh gather_script.sh
gather_script.sh: line 16: syntax error near unexpected token `('
gather_script.sh: line 16: `paste <(echo "$COL1") <(echo "$COL3") -d' ' | column -t'
bash
, notsh
– muru Dec 13 '22 at 07:37