Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function progressfilt {
- local flag=false c count cr=$'\r' nl=$'\n'
- while IFS='' read -d '' -rn 1 c
- do
- if $flag; then
- printf '%s' "$c"
- else
- if [[ $c != $cr && $c != $nl ]]; then
- count=0
- else
- ((count++))
- if ((count > 1)); then
- flag=true
- fi
- fi
- fi
- done
- }
- function wget_nv {
- wget "$@" --progress=bar:force 2>&1 | progressfilt
- }
- wget_nv --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement