You are not logged in.

#1 2015-11-16 14:30:50

xdaks
Member
Registered: 2015-11-16
Posts: 11

[SOLVED] wget progress format

Hi,

command

wget https://github.com/atom/atom/releases/download/v1.1.0/atom-amd64.deb

shows me multiline progress like this

atom-amd64.deb.2   1%[>            ]   1,32M   577KB/s
atom-amd64.deb.2   2%[>            ]   1,67M   634KB/s
atom-amd64.deb.2   3%[=>           ]   2,13M   743KB/s
atom-amd64.deb.2   3%[=>           ]   2,31M   745KB/s   eta 89s
atom-amd64.deb.2   3%[=>           ]   2,50M   743KB/s   eta 89s
atom-amd64.deb.2   4%[=>           ]   2,68M   742KB/s   eta 89s
atom-amd64.deb.2   4%[==>          ]   2,86M   744KB/s   eta 89s
atom-amd64.deb.2   4%[==>          ]   3,04M   745KB/s   eta 88s
atom-amd64.deb.2   4%[==>          ]   3,23M   747KB/s   eta 88s
atom-amd64.deb.2   5%[==>          ]   3,43M   748KB/s   eta 88s
atom-amd64.deb.2   5%[==>          ]   3,59M   749KB/s   eta 88s
atom-amd64.deb.2   5%[===>         ]   3,78M   779KB/s   eta 88s
atom-amd64.deb.2   5%[===>         ]   3,96M   803KB/s   eta 86s
...

How can I switch progress into single line? I tried various options, but without success...

Last edited by xdaks (2015-11-21 13:43:13)

Offline

#2 2015-11-16 14:48:29

damo
....moderator....
Registered: 2015-08-20
Posts: 6,701

Re: [SOLVED] wget progress format

xdaks wrote:

.... I tried various options, but without success...

Not helpful! What options have you tried?

Have you looked at the wget manpages? `--progress` might do what you need.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2015-11-16 15:19:09

twoion
一期一会
Registered: 2015-08-10
Posts: 3,317

Re: [SOLVED] wget progress format

You can create a file ~/.wgetrc with your preferred options, which every instance of wget you launch will heed. The progressbar style, as damo already suggested, is configurable via the 'progress' option either on the command line or in the wgetrc file.

Refer to the man page for a detailed explaination of --progress and the wgetrc format.

Offline

#4 2015-11-16 15:43:52

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,370
Website

Re: [SOLVED] wget progress format

That would happen with
- somehow borken terminal (emulator)
- or sort of a terminal that does not support input buffering
- wget probably expects min-width (by default)

Last edited by brontosaurusrex (2015-11-16 15:45:53)

Offline

#5 2015-11-16 17:52:08

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

When I run Hydrogen in VirtualBox (5.x), command

wget https://github.com/atom/atom/releases/download/v1.1.0/atom-amd64.deb

shows multiline output, same command in "non VirtualBox" Hydrogen instalation returns single line.

Offline

#6 2015-11-17 07:07:39

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

i just tried the exact same command in both archlinux and bunsenlabs and the only way i can reproduce that is by constantly holding the down arrow. (*)

so,
- do you have a ~/.wgetrc?
- what terminal emul do you use?
- is your keyboard broken?


(*) if i resize the term to less than a certain width, wget switches to a display similar to what you describe in post #1, but that's by design.


Give to COVAX! Here or here. (explanation)

Offline

#7 2015-11-17 15:43:01

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

ohnonot wrote:

i just tried the exact same command in both archlinux and bunsenlabs and the only way i can reproduce that is by constantly holding the down arrow.

so,
- do you have a ~/.wgetrc?
- what terminal emul do you use?
- is your keyboard broken?

- I don't have ~/.wgetrc
- terminal emulator is terminator
- I don't think my keyboard is broken. In other distros (Manjaro 15.x, Mint 17, Xubuntu 14.04, Crunchbang Waldorf...) in VirtualBox on the same machine wget works fine.

ohnonot wrote:

if i resize the term to less than a certain width, wget switches to a display similar to what you describe in post #1, but that's by design.

I try to change the size of the terminator window...

Offline

#8 2015-11-17 15:46:47

twoion
一期一会
Registered: 2015-08-10
Posts: 3,317

Re: [SOLVED] wget progress format

Tell us the output of

echo $TERM

Maybe wrong terminfo settings?

Offline

#9 2015-11-18 07:21:05

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

twoion wrote:

Tell us the output of

echo $TERM

Maybe wrong terminfo settings?

echo $TERM returns xterm

Offline

#10 2015-11-18 08:04:29

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] wget progress format

xdaks wrote:

echo $TERM returns xterm

...and your terminal is?

Are you forcing $TERM in any of your shell configuration files?

grep TERM ~/.{bash_profile,profile,bashrc}

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#11 2015-11-18 08:48:41

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

Head_on_a_Stick wrote:
xdaks wrote:

echo $TERM returns xterm

...and your terminal is?

Are you forcing $TERM in any of your shell configuration files?

grep TERM ~/.{bash_profile,profile,bashrc}

My terminal is terminator and I have new clean Hydrogen installation in VirtualBox without any customizations, but if I run Hydrogen live in same VirtualBox wget works fine, so I will try to install it again.

Offline

#12 2015-11-18 14:32:24

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

Seems the problem is in setting of LANG variable. If LANG is en_US.UTF-8 wget works fine, if LANG is cs_CZ.UTF-8 wget returns multiline progress.

Offline

#13 2015-11-18 15:28:28

xaos52
The Good Doctor
From: Planet of the @pes
Registered: 2015-09-30
Posts: 695

Re: [SOLVED] wget progress format

If that is the problem, then

LANG=C wget https://github.com/atom/atom/releases/download/v1.1.0/atom-amd64.deb

will probably work fine no matter what LANG you have set.
This sets LANG to C for the wget command only.

Offline

#14 2015-11-18 18:07:23

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

^ that's a workaround, but xdaks seems to have a real problem there.
unfortunately, i have no clue why it would do it with czech, but not with english.
one thought: try it with czech, then unplug the keyboard while downloading (i hope it's not a laptop).

please don't forget to supply this output:

grep TERM ~/.{bash_profile,profile,bashrc}

Last edited by ohnonot (2015-11-18 18:09:33)


Give to COVAX! Here or here. (explanation)

Offline

#15 2015-11-18 19:13:06

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

ohnonot wrote:

^ that's a workaround, but xdaks seems to have a real problem there.
unfortunately, i have no clue why it would do it with czech, but not with english.
one thought: try it with czech, then unplug the keyboard while downloading (i hope it's not a laptop).

please don't forget to supply this output:

grep TERM ~/.{bash_profile,profile,bashrc}

grep TERM ~/.{bash_profile,profile,bashrc} returns

grep: /home/xdaks/.bash_profile: Directory or file not exist
/home/xdaks/.bashrc:case "$TERM" in
/home/xdaks/.bashrc:case "$TERM" in

Disconnecting the keyboard does not affect anything, progress is still multiline.

Offline

#16 2015-11-18 21:57:52

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] wget progress format

What is the output of:

localectl

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#17 2015-11-18 22:11:56

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

Head_on_a_Stick wrote:

What is the output of:

localectl

localectl:

  System Locale: LANG=cs_CZ.UTF-8
       VC Keymap: n/a
      X11 Layout: cz
       X11 Model: pc105

Offline

#18 2015-11-19 07:24:01

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

i'm stumped...

try this with a different terminal emulator.
other apps use a similar progress bar; maybe curl, or apt-get. have you tried with other apps?
can you in fact reproduce any kind of similar behavior with any other application or terminal emulator?


Give to COVAX! Here or here. (explanation)

Offline

#19 2015-11-19 08:18:20

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

ohnonot wrote:

i'm stumped...

try this with a different terminal emulator.
other apps use a similar progress bar; maybe curl, or apt-get. have you tried with other apps?
can you in fact reproduce any kind of similar behavior with any other application or terminal emulator?

- same multiline wget output in gnome-terminal, xfce4-terminal, tty...

- command:

curl -L -O -# https://github.com/atom/atom/releases/download/v1.1.0/atom-amd64.deb

shows single line progress bar, also "fancy progress" in apt-get is single line

- I have no idea, how to reproduce similar behavior with other application...

Offline

#20 2015-11-20 07:01:45

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

seems you found a bug in wget.
you should file a bug report!

as a workaround, maybe you can use this:

‘--local-encoding=encoding’
    Force Wget to use encoding as the default system encoding. That affects how Wget converts URLs specified as arguments from locale to UTF-8 for IRI support.
    Wget use the function nl_langinfo() and then the CHARSET environment variable to get the locale. If it fails, ASCII is used.
    You can set the default local encoding using the local_encoding command in .wgetrc. That setting may be overridden from the command line.


Give to COVAX! Here or here. (explanation)

Offline

#21 2015-11-20 07:18:55

damo
....moderator....
Registered: 2015-08-20
Posts: 6,701

Re: [SOLVED] wget progress format

ohnonot wrote:

seems you found a bug in wget...

xdaks wrote:

When I run Hydrogen in VirtualBox (5.x), command

wget https://github.com/atom/atom/releases/download/v1.1.0/atom-amd64.deb

shows multiline output, same command in "non VirtualBox" Hydrogen instalation returns single line.

More likely a bug in Virtualbox?


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#22 2015-11-20 07:40:01

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

damo wrote:

More likely a bug in Virtualbox?

oh, i see.
well, i run bl in a vm and can't reproduce the problem, but i haven't installed czech locale.
so until someone tries that, it could be either...


Give to COVAX! Here or here. (explanation)

Offline

#23 2015-11-20 09:01:59

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

damo wrote:

More likely a bug in Virtualbox?

- it was my mistake, the issue appears also out of Virtualbox

ohnonot wrote:

seems you found a bug in wget.
you should file a bug report!

as a workaround, maybe you can use this:

‘--local-encoding=encoding’
    Force Wget to use encoding as the default system encoding. That affects how Wget converts URLs specified as arguments from locale to UTF-8 for IRI support.
    Wget use the function nl_langinfo() and then the CHARSET environment variable to get the locale. If it fails, ASCII is used.
    You can set the default local encoding using the local_encoding command in .wgetrc. That setting may be overridden from the command line.

- unfortunately --local-encoding option doesn't affect multiline output
- I don't think it's a bug in wget, because same version (1.16) with czech locale works in Mint, *buntu, Manjaro...

I guess is time to leave solving this wget issue so far, so thanks all, I really appreciate your help and suggestions.

Offline

#24 2015-11-21 07:30:51

ohnonot
...again
Registered: 2015-09-29
Posts: 5,554

Re: [SOLVED] wget progress format

well you should file a bug report nevertheless!
i'd say with bunsenlabs first, then with debian.
otherwise the hard work of this thread just goes to the dogs.


Give to COVAX! Here or here. (explanation)

Offline

#25 2015-11-21 13:41:07

xdaks
Member
Registered: 2015-11-16
Posts: 11

Re: [SOLVED] wget progress format

ohnonot wrote:

well you should file a bug report nevertheless!
i'd say with bunsenlabs first, then with debian.
otherwise the hard work of this thread just goes to the dogs.

Understand, finally i found it was already reported: http://comments.gmane.org/gmane.comp.we … eral/14206

Offline

Board footer

Powered by FluxBB