[plug] Bash "Processing" Script
Jay Turner
jturner at bsis.com.au
Fri Jun 11 12:35:07 WST 2004
Jay said:
> > I wrote a script that appeared to be able to do all that however when I
> > called 'dd' (actually 'sleep 15' for testing)
> > the script would wait until 'sleep 15' finished before processing the
> > rest of the script which contained the dot printing portion.
>
Bernd said:
> Notwithstanding that this won't actually tell you that dd is
> actually doing its thing:
>
> ( while : ; do sleep 3 ; echo -n "." ; done ) &
> dotter=$!
> dd if=/dev/the_ universe of=black_hole bs=1planet
> kill $dotter
>
> A "better" way would be to check to see if the output is growing
> or if it's been updated every few seconds for a special file before
> producing the dot.
This is very similar to the squid function I posted about.
I believe this will do what I require.
Could you please explain what "while : ;" and "dotter=$!" are doing.
I have not encountered them before in my bash experience..
Thanks
Jay
More information about the plug
mailing list