Advertisement
metalx1000

BASH Progress Bar with PV

Jan 18th, 2022
947
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #basic pv progress bar
  3. find / 2>/dev/null|pv |cat > /tmp/file.log
  4.  
  5. #the above will go pretty fast
  6. #so to slow it down we'll put it in a loop
  7. #and use echo
  8. find / 2>/dev/null|while read l
  9. do
  10.   echo "$l"
  11. done|pv |cat > /tmp/file.log
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement