rendered paste body#!/bin/sh
#
# /usr/local/bin/picoo.sh v0.2
#
PATH=/bin:/usr/bin
case ${1} in
small)
UPTO=10;;
bigone)
UPTO=35;;
*)
echo "usage: ${0} <small|bigone> [smooth|hairy]"
exit 1
esac
case ${2} in
smooth|'')
LEFT='/'; RIGHT='\\'; JOHOO='|';;
hairy)
LEFT='\\'; RIGHT='/'; JOHOO='|';;
*)
echo "usage: ${0} <small|bigone> [smooth|hairy]"
exit 1
esac
draw() {
I=${UPTO}; J=1
while [ ${J} -le ${UPTO} ]; do
if [ ${GROW} = 1 ]; then
awk 'BEGIN{printf("%'${I}'s%'${J}'s%'${J}'s\n", \
"'${LEFT}'","'${JOHOO}'","'${RIGHT}'")}'
else
awk 'BEGIN{printf("%'${J}'s%'${I}'s%'${I}'s\n", \
"'${RIGHT}'","'${JOHOO}'","'${LEFT}'")}'
fi
I=`expr ${I} - 1`; J=`expr ${J} + 1`
done
}
GROW=1; draw
GROW=0; draw
exit 0
# eof