[linux-l] dd automatisieren
Jan-Benedict Glaw
jbglaw at lug-owl.de
So Feb 14 21:59:34 CET 2010
On Sun, 2010-02-14 21:49:57 +0100, Boris Kirkorowicz <boris-ml07 at kirk.de> wrote:
> > #!/bin/sh
> > p=1
> > echo Durchgang $p
> > for p in 1 6 7
> > do
> > dd if=/dev/disk/by-id/ata-ST95-part$p of=/dev/disk/by-id/ata-Hitachi_HTS5-part$p& pid=$!
> > while true; do kill -USR1 $pid; sleep 1; done
> > done
>
> funktioniert freilich nicht. Jetzt habe ich so lange herumgefummelt, bis
> ich vollends verwirrt bin. Wie kriegt man das hin?
Dein Problem hier ist, daß die innere Schleife nie abbricht.
#!/usr/bin/env sh
for p in 1 6 7; do
echo "Partition $p"
dd if=/dev/disk/by-id/ata-ST95-part$p of=/dev/disk/by-id/ata-Hitachi_HTS5-part$p &
pid=$!
while :; do
kill -0 $pid 2>/dev/null || break
kill -USR1 $pid 2>/dev/null
sleep 1
done
done
MfG, JBG
--
Jan-Benedict Glaw jbglaw at lug-owl.de +49-172-7608481
Signature of: Wenn ich wach bin, träume ich.
the second :
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 197 bytes
Beschreibung: Digital signature
URL : <https://mlists.in-berlin.de/pipermail/linux-l-mlists.in-berlin.de/attachments/20100214/67ec4ae2/attachment.sig>
Mehr Informationen über die Mailingliste linux-l