summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-03-17 20:51:18 +0100
committertv <tv@krebsco.de>2020-03-17 20:51:18 +0100
commit1e915baafbc56c4c626a3c3d042ac0e7d6276561 (patch)
tree8a64e0ee60179dd80e3c7351fb16d0d0a2eab9f3
parent3493cd74a1f6942566fbad4b89f4d3c84f964868 (diff)
irc-announce cat2: use awk
-rw-r--r--krebs/5pkgs/simple/irc-announce/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/krebs/5pkgs/simple/irc-announce/default.nix b/krebs/5pkgs/simple/irc-announce/default.nix
index a90814aa9..52cf12862 100644
--- a/krebs/5pkgs/simple/irc-announce/default.nix
+++ b/krebs/5pkgs/simple/irc-announce/default.nix
@@ -25,10 +25,10 @@ pkgs.writeDashBin "irc-announce" ''
# This is used to see what we send to the irc server. (debug output)
echo2() { echo "$*"; echo "$*" >&2; }
cat2() {
- while read -r line; do
- echo "$line"
- echo "$line" >&2
- done
+ awk '{
+ print $0
+ print $0 > "/dev/stderr"
+ }'
}
# privmsg_cat transforms stdin to a privmsg