I do the following at my Mac terminal:
sudo for i in `seq 0 9`; do nohup my_command > log_$i.txt & done
but I receive the following error:
-bash: syntax error near unexpected token `do'
What's the problem and how can I fix it?
P.S.
I tested some of the suggestions of people here and here they are:
1)
(base) user@SERVER:/directory$ sudo for i in `seq 0 9`; do nohup my_command > log_$i.txt &; done
-bash: syntax error near unexpected token `do'
2)
(base) user@SERVER:/directory$ sudo for i in `seq 0 9`; do nohup my_command > log_$i.txt ; done
-bash: syntax error near unexpected token `do'
3)
(base) user@SERVER:/directory$ sudo for i in `seq 0 9`; do nohup my_command > log_$i.txt done
-bash: syntax error near unexpected token `do'
4)
(base) user@SERVER:directory$ sudo bash -c for i in `seq 0 9`; do nohup my_command > log_$i.txt & done
-bash: syntax error near unexpected token `do'