I'm trying to change the output position of a file transfer made with rsync, as shown below:
rsync -zvh --progress ubuntu-19.10-desktop-amd64.iso /home/lnxusr/Downloads/
From this:
ubuntu-19.10-desktop-amd64.iso
144.67M 5% 34.50MB/s 0:01:05
To this:
ubuntu-19.10-desktop-amd64.iso
144.67M 5% 34.50MB/s 0:01:05
However, when I pipe it to | sed -u 's/[^\s]+//'
, I only get the static output which is:
ubuntu-19.10-desktop-amd64.iso
I tried the answer suggested here to turn off the buffering process with stdbuf -o0
but got the same result as before.
Anyone knows this kind of output manipulation? or if is it even possible to position this output?
[^\s]
is going to match anything that is not literal\
ors
and+
is also literal unless you switch to extended regex mode (-E
or-r
). Trysed -E 's/^\s+//'
– steeldriver Dec 07 '19 at 22:10[^\s]
matches all leading spaces. I tested it with a simple file. No need for extended regex. I think that's more of a buffer problem, but have no idea if it has a turn around. – thiggy01 Dec 07 '19 at 23:48