11-08-2013, 09:49 PM
thanks for the link! very informative. trying it now.
(11-08-2013, 07:41 PM)philsmd Wrote: I don't think that last problem (not wait) has anything to do with for vs while... I think that problem is totally unrelated...
Indeed executing the cmds not one after the other should only happen if you force the process to execute in background ( & )
Try it with the echos to test with while...
Anyway the solution for for is (also see here http://stackoverflow.com/questions/17099...delimiters )
Code:#!/bin/sh
old_IFS="$IFS"
IFS='
'
for line in $(cat $1)
do
echo "======> mask: $line ..."
echo ./hashcat-0.46/hashcat-cli32.bin -m 0 -a 3 --disable-potfile --outfile-format=1 -o cracked.dic $2 $line
done
IFS="$old_IFS"
Basically, you need to enter a newline right into the shell script file... should work...
both while/for work here