Xargs -P command execution status

Hi,

I am working on a file copier utility where I have written the copy commands to a batch file e.g. file_copier.bat which i pass to xargs command as follows.

cat file_copier.bat | xargs -n 1 -P 40

I also want to record the copy command status of each file/command in the form "command failed", in case of file not found also I want to record the stderr to a file.

That's a useless use of cat, you can do < file_coper.bat xargs -n 1 -P 40 shorter, faster, and just as readable.

Anyway, xargs does not seem to have the features you want. You can probably do it in shell, once we find out what you're doing. What are the contents of file_copier.bat ?