Blame


1 450251f0 2004-09-06 alex #!/bin/sh
2 450251f0 2004-09-06 alex #
3 450251f0 2004-09-06 alex # ngIRCd Test Suite
4 450251f0 2004-09-06 alex # Copyright (c)2002-2004 by Alexander Barton (alex@barton.de)
5 450251f0 2004-09-06 alex #
6 450251f0 2004-09-06 alex # This program is free software; you can redistribute it and/or modify
7 450251f0 2004-09-06 alex # it under the terms of the GNU General Public License as published by
8 450251f0 2004-09-06 alex # the Free Software Foundation; either version 2 of the License, or
9 450251f0 2004-09-06 alex # (at your option) any later version.
10 450251f0 2004-09-06 alex # Please read the file COPYING, README and AUTHORS for more information.
11 450251f0 2004-09-06 alex #
12 450251f0 2004-09-06 alex # $Id: functions.inc,v 1.1 2004/09/06 22:04:06 alex Exp $
13 450251f0 2004-09-06 alex #
14 450251f0 2004-09-06 alex
15 450251f0 2004-09-06 alex # test how to call echo to get output without newline
16 450251f0 2004-09-06 alex echo -n | grep -- -n >/dev/null 2>&1
17 450251f0 2004-09-06 alex if [ $? -eq 0 ]; then
18 450251f0 2004-09-06 alex ECHO_N=""; ECHO_C="\c"
19 450251f0 2004-09-06 alex else
20 450251f0 2004-09-06 alex ECHO_N="-n"; ECHO_C=""
21 450251f0 2004-09-06 alex fi
22 450251f0 2004-09-06 alex
23 450251f0 2004-09-06 alex echo_n()
24 450251f0 2004-09-06 alex {
25 450251f0 2004-09-06 alex echo $ECHO_N "$*$ECHO_C"
26 450251f0 2004-09-06 alex }
27 450251f0 2004-09-06 alex
28 450251f0 2004-09-06 alex # -eof-