Tags: #xargs #async #find
#!/bin/bash
replacement_patterns() {
echo "Processing file: $1"
}
replacement_patterns "$@"
# on macOS we have to use a separate shell process with a separate script file for async processing to work...
find "/Users/integralist/Code/path/to/directory" -type f -print0 | xargs -0 -P "$(nproc)" -n 1 bash -c './async.sh "$@"' _