Is there any way to hide all output from axel command but DO NOT HIDE progress bar. I want to get output like;
[ 5%] [0 1 2 3 ] [ 567,5KB/s] [15:59]This output from axel -a but it always print every step although I edited ~/.axelrc and /etc/axelrc I changed # verbose = 1 with 0. I dont want to send it background like command &. Do you have any idea? Please dont suggest wget in wget I can do it with -nv --show-progress but no option for axel.
1 Answer
In a bash terminal, you can use:
axel -a | awk -W interactive '$0~/\[/{printf "%s'$'\r''", $0}'With -W interactive awk reads line-buffered and writes unbuffered to stdout. Then awk searches for a [ in the line and prints it with a ^M character $'\r'.
You can also write a function for that:
function axel_progress { axel -a "$1" | awk -W interactive '$0~/\[/{printf "%s'$'\r''", $0}'
}Now you can call axel by:
axel_progress 1