nsbin/old/teecho
Nico Schottelius c23bfc5a82 reorganise more old stuff
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-12-28 20:13:28 +01:00

20 lines
391 B
Bash
Executable file

#!/bin/sh
exec 3>/dev/tty
echo2()
{
echo "$@" 1>&2
}
echo3()
{
echo "$@" 1>&3
}
echo1()
{
echo "$@" 1>&1
}
echo2 a b c 2>&1 >/dev/null
echo2 d e f >/dev/null 2>&1
echo2 g h i | tr '[a-z]' '[A-Z]'
( echo2 j k l; echo x y z ) | tr '[a-z]' '[A-Z]'
( echo1 a1 ;echo2 b2; echo3 c3 ) >/dev/null
( echo1 d1 ;echo2 e2; echo3 f3 ) | tr '[a-z]' '[A-Z]'