Can you run multiple piped commands on one line of an action script

Is it possible to run multiple piped commands on one line of an action script
eg.

ps -ef | grep wscan | awk ‘{print $2}’ | xargs -i kill {} > /tmp/kill.out 2>&1

whenever I try doing this, my action script always fails on the multiple piped line in the action script ?? It just fails with

The action failed.
This action has been applied 1 time and will not be applied again.

Is this a limitation on bigfix action scripts.

it will help if you post your exact actionscript but off top of my head, you need to escape the curly brackets - curly brackets is acrionscript’s notation that there is relevance substitution coming, so if you want it not to be relevance then escape it. Try this:

ps -ef | grep wscan | awk ‘{{print $2}’ | xargs -i kill {{} > /tmp/kill.out 2>&1
3 Likes

That did the trick. Thank you.