diff options
author | EuAndreh <eu@euandre.org> | 2024-06-16 09:59:39 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-06-16 09:59:39 -0300 |
commit | 8ff50fe2488d1a2e19c134c4012f0ec1905af846 (patch) | |
tree | 805a33d2718abc53ac1e0922bcb7afdfe67b63a0 | |
parent | bin/with-{one-monitor,two-monitors}: Add output from arandr(1) (diff) | |
download | dotfiles-8ff50fe2488d1a2e19c134c4012f0ec1905af846.tar.gz dotfiles-8ff50fe2488d1a2e19c134c4012f0ec1905af846.tar.xz |
bin/uri: Unbuffer when processing an stream online
-rwxr-xr-x | bin/uri | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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($_); } |