Possible to use helper as external command argument?

Hello,

The post title is complicated but with an example, it should be fine :slight_smile:

I want to run this code in a script:
grep --extended-regexp --invert-match '^($|#)' data/deleted.files | xargs --max-args=1 ynh_secure_remove --file 2>&1

Issue is that xargs cannot find the ynh_secure_remove command. I finally found the https://github.com/koalaman/shellcheck/wiki/SC2033 and I believe that it cannot be done easilly …

So, if a “bash guru” is nearby and could give some help :wink:

Alternatively you can do it with a for loop

ynh_secure_remove is just a bash function, not an executable program.