I'm testing my network speed with a script and for it to calculate average speed I need to read the speed for each run.
command:
dd if=InputFile of=OutputFile bs=4096k
output:
64+0 records in
64+0 records out
268435456 bytes (268 MB) copied, 1.8519 s, 145MB/s
the problem is that the dd command always prints the output to stdout. I can manage to pipe it or write it to file so i can read the 145MB/s
I've tried the following lines:
dd if=InputFile of=OutputFile bs=4096k >> log.txt
- creates an empty file and prints to stdout
dd if=InputFile of=OutputFile bs=4096k | grep *
- fails
echo `dd if=InputFile of=OutputFile bs=4096k` # fails