Code:
0 /home/sea/net/dls # sh -x /home/sea/prjs/tui/bin/mini-dd.sh
+ TMP=/tmp/dd.tmp~
+ SOURCE=/home/sea/net/dls/parabola-2015.11.11-dual.iso
+ TARGET=/dev/sdc
+ GREP=grep
+ AWK=gawk
+ SED=sed
+ LC_ALL=C
+ opts_passed=status=progress
+ PID=30287
+ ps 30287
+ write_dd
+ dd status=progress if=/home/sea/net/dls/parabola-2015.11.11-dual.iso of=/dev/sdc
++ transfered_bytes
+++ gawk $'-vRS=\r' 'END{NR=1}END {print $1}' /tmp/dd.tmp~
+++ tail -n1
++ value=
++ printf %s ''
++ sed 's,[(|)],,g'
+ echo 'Bytes transfered: '
Bytes transfered:
+ hexdump -CL /tmp/dd.tmp~
+ sleep 1
+ ps 30287
++ transfered_bytes
+++ gawk $'-vRS=\r' 'END{NR=1}END {print $1}' /tmp/dd.tmp~
+++ tail -n1
++ value=6493696
++ printf %s 6493696
++ sed 's,[(|)],,g'
+ echo 'Bytes transfered: 6493696'
Bytes transfered: 6493696
+ hexdump -CL /tmp/dd.tmp~
00000000 0d 36 34 39 33 36 39 36 20 42 79 74 65 73 20 28 |.6493696 Bytes (|
00000010 36 2e 35 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c |6.5 MB) kopiert,|
00000020 20 31 2e 30 30 30 30 30 30 20 73 2c 20 36 2e 35 | 1.000000 s, 6.5|
00000030 20 4d 42 2f 73 | MB/s|
00000035
+ sleep 1
+ ps 30287
++ transfered_bytes
+++ gawk $'-vRS=\r' 'END{NR=1}END {print $1}' /tmp/dd.tmp~
+++ tail -n1
++ value=12984832
++ printf %s 12984832
++ sed 's,[(|)],,g'
+ echo 'Bytes transfered: 12984832'
Bytes transfered: 12984832
+ hexdump -CL /tmp/dd.tmp~
00000000 0d 36 34 39 33 36 39 36 20 42 79 74 65 73 20 28 |.6493696 Bytes (|
00000010 36 2e 35 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c |6.5 MB) kopiert,|
00000020 20 31 2e 30 30 30 30 30 30 20 73 2c 20 36 2e 35 | 1.000000 s, 6.5|
00000030 20 4d 42 2f 73 0d 31 32 39 38 34 38 33 32 20 42 | MB/s.12984832 B|
00000040 79 74 65 73 20 28 31 33 20 4d 42 29 20 6b 6f 70 |ytes (13 MB) kop|
00000050 69 65 72 74 2c 20 32 2e 30 30 30 36 30 33 20 73 |iert, 2.000603 s|
00000060 2c 20 36 2e 35 20 4d 42 2f 73 |, 6.5 MB/s|
0000006a
+ sleep 1
<....>
+ hexdump -CL /tmp/dd.tmp~
00000000 0d 36 35 35 30 30 31 36 20 42 79 74 65 73 20 28 |.6550016 Bytes (|
00000010 36 2e 36 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c |6.6 MB) kopiert,|
00000020 20 31 2e 30 30 30 34 31 32 20 73 2c 20 36 2e 35 | 1.000412 s, 6.5|
00000030 20 4d 42 2f 73 0d 31 32 39 33 35 36 38 30 20 42 | MB/s.12935680 B|
00000040 79 74 65 73 20 28 31 33 20 4d 42 29 20 6b 6f 70 |ytes (13 MB) kop|
00000050 69 65 72 74 2c 20 32 2e 30 30 30 34 34 31 20 73 |iert, 2.000441 s|
00000060 2c 20 36 2e 35 20 4d 42 2f 73 0d 31 39 32 38 34 |, 6.5 MB/s.19284|
00000070 34 38 30 20 42 79 74 65 73 20 28 31 39 20 4d 42 |480 Bytes (19 MB|
00000080 29 20 6b 6f 70 69 65 72 74 2c 20 33 2e 30 30 30 |) kopiert, 3.000|
00000090 37 38 37 20 73 2c 20 36 2e 34 20 4d 42 2f 73 0d |787 s, 6.4 MB/s.|
000000a0 32 35 36 38 32 34 33 32 20 42 79 74 65 73 20 28 |25682432 Bytes (|
000000b0 32 36 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c 20 |26 MB) kopiert, |
000000c0 34 2e 30 30 31 31 33 37 20 73 2c 20 36 2e 34 20 |4.001137 s, 6.4 |
000000d0 4d 42 2f 73 0d 33 31 39 32 30 36 34 30 20 42 79 |MB/s.31920640 By|
000000e0 74 65 73 20 28 33 32 20 4d 42 29 20 6b 6f 70 69 |tes (32 MB) kopi|
000000f0 65 72 74 2c 20 35 2e 30 30 31 32 39 39 20 73 2c |ert, 5.001299 s,|
00000100 20 36 2e 34 20 4d 42 2f 73 0d 33 38 32 36 35 33 | 6.4 MB/s.382653|
00000110 34 34 20 42 79 74 65 73 20 28 33 38 20 4d 42 29 |44 Bytes (38 MB)|
00000120 20 6b 6f 70 69 65 72 74 2c 20 36 2e 30 30 31 38 | kopiert, 6.0018|
00000130 31 30 20 73 2c 20 36 2e 34 20 4d 42 2f 73 0d 34 |10 s, 6.4 MB/s.4|
00000140 34 36 39 36 30 36 34 20 42 79 74 65 73 20 28 34 |4696064 Bytes (4|
00000150 35 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c 20 37 |5 MB) kopiert, 7|
00000160 2e 30 30 31 38 32 35 20 73 2c 20 36 2e 34 20 4d |.001825 s, 6.4 M|
00000170 42 2f 73 0d 35 31 32 31 32 38 30 30 20 42 79 74 |B/s.51212800 Byt|
00000180 65 73 20 28 35 31 20 4d 42 29 20 6b 6f 70 69 65 |es (51 MB) kopie|
00000190 72 74 2c 20 38 2e 30 30 32 31 31 35 20 73 2c 20 |rt, 8.002115 s, |
000001a0 36 2e 34 20 4d 42 2f 73 0d 35 37 37 34 35 39 32 |6.4 MB/s.5774592|
000001b0 30 20 42 79 74 65 73 20 28 35 38 20 4d 42 29 20 |0 Bytes (58 MB) |
000001c0 6b 6f 70 69 65 72 74 2c 20 39 2e 30 30 32 32 34 |kopiert, 9.00224|
000001d0 37 20 73 2c 20 36 2e 34 20 4d 42 2f 73 0d 36 34 |7 s, 6.4 MB/s.64|
000001e0 32 33 38 30 38 30 20 42 79 74 65 73 20 28 36 34 |238080 Bytes (64|
000001f0 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c 20 31 30 | MB) kopiert, 10|
00000200 2e 30 30 32 35 38 31 20 73 2c 20 36 2e 34 20 4d |.002581 s, 6.4 M|
00000210 42 2f 73 0d 36 39 32 30 32 34 33 32 20 42 79 74 |B/s.69202432 Byt|
00000220 65 73 20 28 36 39 20 4d 42 29 20 6b 6f 70 69 65 |es (69 MB) kopie|
00000230 72 74 2c 20 31 31 2e 30 32 31 31 34 38 20 73 2c |rt, 11.021148 s,|
00000240 20 36 2e 33 20 4d 42 2f 73 0d 37 34 30 35 32 30 | 6.3 MB/s.740520|
00000250 39 36 20 42 79 74 65 73 20 28 37 34 20 4d 42 29 |96 Bytes (74 MB)|
00000260 20 6b 6f 70 69 65 72 74 2c 20 31 32 2e 30 32 31 | kopiert, 12.021|
00000270 35 32 33 20 73 2c 20 36 2e 32 20 4d 42 2f 73 0d |523 s, 6.2 MB/s.|
00000280 37 38 32 34 34 38 36 34 20 42 79 74 65 73 20 28 |78244864 Bytes (|
00000290 37 38 20 4d 42 29 20 6b 6f 70 69 65 72 74 2c 20 |78 MB) kopiert, |
000002a0 31 33 2e 30 32 31 35 32 34 20 73 2c 20 36 2e 30 |13.021524 s, 6.0|
000002b0 20 4d 42 2f 73 0d 38 33 34 34 30 31 32 38 20 42 | MB/s.83440128 B|
000002c0 79 74 65 73 20 28 38 33 20 4d 42 29 20 6b 6f 70 |ytes (83 MB) kop|
000002d0 69 65 72 74 2c 20 31 34 2e 30 32 31 37 35 31 20 |iert, 14.021751 |
000002e0 73 2c 20 36 2e 30 20 4d 42 2f 73 0d 38 38 33 37 |s, 6.0 MB/s.8837|
000002f0 39 39 30 34 20 42 79 74 65 73 20 28 38 38 20 4d |9904 Bytes (88 M|
00000300 42 29 20 6b 6f 70 69 65 72 74 2c 20 31 35 2e 30 |B) kopiert, 15.0|
00000310 32 32 31 34 31 20 73 2c 20 35 2e 39 20 4d 42 2f |22141 s, 5.9 MB/|
00000320 73 0d 39 33 32 35 38 32 34 30 20 42 79 74 65 73 |s.93258240 Bytes|
00000330 20 28 39 33 20 4d 42 29 20 6b 6f 70 69 65 72 74 | (93 MB) kopiert|
00000340 2c 20 31 36 2e 30 32 32 37 33 34 20 73 2c 20 35 |, 16.022734 s, 5|
00000350 2e 38 20 4d 42 2f 73 0d 39 38 33 37 38 32 34 30 |.8 MB/s.98378240|
00000360 20 42 79 74 65 73 20 28 39 38 20 4d 42 29 20 6b | Bytes (98 MB) k|
00000370 6f 70 69 65 72 74 2c 20 31 37 2e 30 35 31 31 35 |opiert, 17.05115|
00000380 36 20 73 2c 20 35 2e 38 20 4d 42 2f 73 |6 s, 5.8 MB/s|
0000038d
+ sleep 1
^C