aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-06-16 09:59:39 -0300
committerEuAndreh <eu@euandre.org>2024-06-16 09:59:39 -0300
commit8ff50fe2488d1a2e19c134c4012f0ec1905af846 (patch)
tree805a33d2718abc53ac1e0922bcb7afdfe67b63a0 /bin
parentbin/with-{one-monitor,two-monitors}: Add output from arandr(1) (diff)
downloaddotfiles-8ff50fe2488d1a2e19c134c4012f0ec1905af846.tar.gz
dotfiles-8ff50fe2488d1a2e19c134c4012f0ec1905af846.tar.xz
bin/uri: Unbuffer when processing an stream online
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uri6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/uri b/bin/uri
index ca26326..bbe67ef 100755
--- a/bin/uri
+++ b/bin/uri
@@ -74,6 +74,8 @@ if ($opts{h}) {
my $fn = $opts{d} ? \&URI::Escape::uri_unescape : \&URI::Escape::uri_escape;
-for (@ARGV ? @ARGV : <STDIN>) {
- say &$fn($_);
+$|++;
+
+while ($_ = (@ARGV ? @ARGV : <STDIN>)) {
+ print &$fn($_);
}