3 ms·
You can xargs a bash function That function must be exported before, for instance: my_function(){ ... } export -f my_function find | xargs my_function
by JackSlateur 4y ago
You can xargs a bash function
That function must be exported before, for instance:
my_function(){
...
}
export -f my_function
find | xargs my_function
- arendtio 4y agoYeah, I know, but 'export -f' is not POSIX compliant [1]. In addition, I have read, that this solution has quite a bad performance [2]. 1: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_22 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V... 2: https://stackoverflow.com/a/67780632/1149404 https://stackoverflow.com/a/67780632/1149404