I wrote the following script in the test.sh:#!/bin/shcompare() { if [ $1 != root ]; then echo Fail >> CAT1.txt fi }awk -F: '$4 == 0' /etc/passwd | cut -d: f1 | xargs -n1 -i bash -c 'compare $@' _when I execute this scripts, get the following error:_: compare: command not found
Using a function defined in a parent script
bash;shell script;xargs;function