Trying to run shell script via BigFix action script but it fails, Please suggest remediation

Hi All,

I am trying to run the below script via BigFix action script but it shows Exit Code 2. I also used shell to action converter but if failed as well, not sure if there something wrong with the context which works manually on the linux box:-1:
Script
for a in ls /proc/net/bonding/bond* | awk -F"/" '{print $NF}'
do
echo -e “$a: \c”
cat /proc/net/bonding/$a | awk -F"addr:" ‘/addr/ {printf $NF}’
echo
done > /tmp/abc.txt

Fixlet action:-1:

Used Shell to action script convertor and it failed as well:-1:

Please suggest on this!! Ty

You need to escape curly brackets - in actionscript they are interpreted as anything in the curly brackets is client relevance. If you actually check the agent log on the machine it will be a bit more descriptive (it will say something along the lines of “relevance substitution failure” if I recall correctly).

Try {{print $NF} on both places within your script.