I'm testing machines for SSH vulnerabilities using SSHredder and wanted
to run all the tests in parallel. 

The problem is BASH is stopping me from backgrounding the processes. 

I tried to use: 

    for i in pdu/* ; 
    do cat $i | netcat host 22 > /tmp/$i.out & ; 
    done 
but I get this error because of the "&": 

    $ for i in pdu/* ; 
    > do cat $i | netcat host 22 > /tmp/$i.out & ; 
    -bash: syntax error near unexpected token `;' 

When I try and escape the ampersand I get:

    for i in pdu/* ; do cat $i | netcat host 22 > /tmp/$i.out \& ; done
    -bash: /tmp/pdu/0000001.pdu.out: No such file or directory

Could anyone help with this?  Is there another way to do it?

BTW the first version works fine in ZSH.

TIA


-- 
*************************
 Simon J.P. Wong

 <[EMAIL PROTECTED]>

**************************
-- 
**************
* Simon Wong *
**************

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to