John Tate wrote:
> I put a comment in before the line with a problem, I don't understand
> why it's not working.
> 
> bash# for x in 1 2 3 4; do time dd if=/dev/random of=/home/test$x
> bs=1k count=64k & done \
> while [ $V -eq 0 ]; \
> do \
> #why the hell is this such a problem!
> V = 0 \
> clear \
> echo -n "Jobs running... " \
> if jobs 4; then; echo -n "last job running!"; else; echo -n "last job 
> stopped";
>  env V=1; fi \
> sleep 1 \
> done
> time cat secure1 secure2 secure3 secure4 > secure_t.vnd \
> time rm secure1 secure2 secure3 secure4

-  ''V = 0'' runs the command named V with parameters = and 0. Use v=0.
   Using all uppercase variables names can clash with internal shell /
   environment variables you'll need later in your script. Think about
   PATH=/foo/bar; touch "$PATH".
-  Why do you use ''clear'' when debugging a script?
-  Why do you add backslashes at the end of every line (every line but
   the first, where you'd actually have needed it)?
-  Why are you using ''env V=1''? The env utility (which is an external
   binary) cannot set the current shell's variables.
-  Why are you trying to launch those dd commands in parallel?
   This will probably not make your script faster, and is much more
   error-prone than a mere:
   for i in 1 2 3 4; do dd ... of="/home/test$i"; done
-  You don't seem to need bash. Most of people I know don't know
   how to use the syntactic sugar that separates bash from pdksh.
   If you want to ask questions about bash there are appropriate
   mailing lists.
-  Please consider posting a properly indented, clean script next time.

Reply via email to