Public bug reported:
The following shell pipeline works with gnucut, but not with cut from
rust:
% while sleep 1; do echo hello,world; done | stdbuf -oL cut -f1 -d, |
cat
What's supposed to happen: outputs "hello" every second
What actually happens: no output at all
This breaks scripts that rely on `stdbuf -oL cut` to work in a line-
buffered manner, e.g. this network throughput monitor script for waybar:
bwm-ng -o csv -t 5000 -C, -u bytes |
grep -e wlp46s0 -e wlp3s0 -e wlp0s20f3 --line-buffered |
stdbuf -oL gnucut -f3-4 -d, |
stdbuf -oL numfmt -d, --to=iec --field=1,2 --suffix=B/s --format=%10.1f
|
stdbuf -oL sed -re 's/K/k/g; s#(.*),(.*)#\2 \1#g'
% lsb_release -rd
Description: Ubuntu 25.10
Release: 25.10
% apt policy coreutils-from-uutils
coreutils-from-uutils:
Installed: 0.0.0~ubuntu24
Candidate: 0.0.0~ubuntu24
Version table:
*** 0.0.0~ubuntu24 500
500 http://sg.archive.ubuntu.com/ubuntu questing/main amd64 Packages
500 http://sg.archive.ubuntu.com/ubuntu questing/main i386 Packages
100 /var/lib/dpkg/status
% apt policy rust-coreutils
rust-coreutils:
Installed: 0.2.2-0ubuntu2.1
Candidate: 0.2.2-0ubuntu2.1
Version table:
*** 0.2.2-0ubuntu2.1 500
500 http://sg.archive.ubuntu.com/ubuntu questing-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu questing-security/main amd64
Packages
100 /var/lib/dpkg/status
0.2.2-0ubuntu2 500
500 http://sg.archive.ubuntu.com/ubuntu questing/main amd64 Packages
** Affects: rust-coreutils (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2142228
Title:
`stdbuf -oL cut` doesn't work in a pipeline
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2142228/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs