nsbin/old/teecho

21 lines
391 B
Text
Raw Normal View History

2006-07-20 07:54:37 +00:00
#!/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]'