run shell script under nohup directly [solved]

Hi,

i am not able to run the loop in nohup directly.

nohup 'for i in $(seq 10); do echo $i;./mscript.sh $i; done'

can some one help me how to run this directly in nohup?

---------- Post updated 03-15-12 at 12:20 AM ---------- Previous update was 03-14-12 at 11:59 PM ----------

From man page of 'sh' i got this:
-c Read commands from the command_string operand instead of from the
standard input. Special parameter 0 will be set from the command_name operand
and the positional parameters ($1, $2, etc.) set from the remaining argument operands.

Now I got it.

nohup sh -c 'for i in $(seq 10); do echo $i;./mscript.sh $i; done' &