1

I am trying to use a for do command that I can run as a one liner in Solaris/Linux, and would like the do command to run asynchronously. I have tried the following:

for i in `ls AMQ*.FMT`; do ./mqtrcfrmt.solaris $i $i.2 &; done

but I get an error like the following:

bash: syntax error near unexpected token `;'

Is there a way to get the do part of this for/do command to recognize the ampersand (&) and run this command asynchronously?

Graeme
  • 34,027
tczielke
  • 11
  • 1

1 Answers1

1

Do not put a semi-colon after the &. Otherwise this would mean that there is an empty command after it.

vinc17
  • 12,174