Skip to content

Instantly share code, notes, and snippets.

@belo82
Last active June 18, 2017 15:57
Show Gist options
  • Save belo82/2f10bbbf83a9369174127145a19f60ce to your computer and use it in GitHub Desktop.
Save belo82/2f10bbbf83a9369174127145a19f60ce to your computer and use it in GitHub Desktop.
Send file to localhost:8000 in infinite loop, display number of iterations and progress bar for each iteration.
time(i=0; while true; do i=`expr $i + 1`; echo "iteration $i"; pv -p -t -e -r -b -L 10m file.raw | nc localhost 8000; if ! [[ -f "run.txt" ]]; then echo "exit"; break; fi; sleep 1; done)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment