Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # USAGE:
  4. # ./speed_test.sh /path/to/my/file /path/to/destination number_of_tests
  5.  
  6. NUM_TESTs=$3
  7. SUM=0
  8. for i in$(seq 1 $NUM_TESTs); do
  9.  
  10. REC=`ddif=$1 of=$22>some_random_file_ ; catsome_random_file_|cut -d " " -f8 |tail -1`
  11.  
  12. SUM=`echo$SUM + $REC|bc`
  13.  
  14. done
  15.  
  16. RESULT=`echo$SUM / $NUM_TESTs|bc|awk'{ str1=str1 __g5_token59eb831783d05 }END{ print str1 }'`
  17.  
  18. echo$RESULT MB/s
  19.  
  20. #clean up
  21. rmsome_random_file_
  22. rm$2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement