nsbin/teecho
Nico Schottelius d3c6e29902 Initial commit
2006-07-20 09:54:37 +02: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]'