From 7a7b7a1c1acfb0f72a55a542580bffe50b93f565 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 30 Jul 2001 20:42:27 +0000 Subject: [PATCH] A bit more portable calc - use awk instead of echo -n git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1692 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- irssi.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irssi.conf b/irssi.conf index bfdb3ba7..5d30dfd0 100644 --- a/irssi.conf +++ b/irssi.conf @@ -64,5 +64,6 @@ aliases = { CHAT = "dcc chat"; RUN = "SCRIPT LOAD"; UPTIME = "eval exec - expr `date +%s` - \\$F | awk '{print \"Irssi uptime: \"int(\\\\\\$1/3600/24)\"d \"int(\\\\\\$1/3600%24)\"h \"int(\\\\\\$1/60%60)\"m \"int(\\\\\\$1%60)\"s\" }'"; - CALC = "exec - echo -n '$* = ' && echo 'scale = 3\; $*'|bc"; + CALC = "exec - echo $* | bc | awk '{print "$* = "\$1}'"; +"; };