Something like the following that leverages the createfile operator has worked for me in the past.
delete __createfile
delete /tmp/bf_tmp_script.sh
createfile until __EOF
#
# YOUR LINUX/DISTRO SPECIFIC SCRIPT GOES HERE
#
__EOF
move __createfile /tmp/bf_tmp_script.sh
wait chmod 755 /tmp/bf_tmp_script.sh
wait sudo su - root -c "/tmp/bf_tmp_script.sh"
delete /tmp/bf_tmp_script.sh
Just make sure that your Linux/Distro specific commands/scripts work independently before plugging into BigFix.