FANCY BANNER
Warren D. Swan
woods at cbnewsc.ATT.COM
Thu Aug 24 08:18:47 AEST 1989
In article <730 at idsssd.UUCP> bruce at idsssd.UUCP (Bruce T. Harvey) writes:
>In article <10650068 at hpisod2.HP.COM>, decot at hpisod2.HP.COM (Dave Decot) writes:
>> Hey, that's a good comp.unix.question.
>> ...
>
>And, for all you folks that use banner to produce more than one line of
>output display at a time:
>
>MYvar=$1
>shift
>banner "$*" | tr "#" "$MYvar"
Excellent. For the sake of discussion, we'll call this script: sign.
Just change the "$*" to "$@" and it'll behave even more like
a spiffed up version of banner.
(Do you see the difference? If we left it as banner "$*"
[thanks for using the quotes, most people seem to forget them], then:
sign @ "This is" "3 lines" "of info."
would cause output like:
banner "This is 3 lines of info."
with the #s replaced by @s, thusly:
@@@@@@@ @@@@@
@ @ @ @ @@@@ @ @@@@ @ @
@ @ @ @ @ @ @ @
@ @@@@@@ @ @@@@ @ @@@@ @@@@@
@ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @ @ @ @
@ @ @ @ @@@@ @ @@@@ @@@@@
INSTEAD OF what was originally intended:
banner "This is" "3 lines" "of info."
with the #s replaced by @s, which I won't reproduce here. Other than that,
Good idea!)
Warren D. Swan (WooDS) Y n n ____ __ You can't tell which way a train
AT&T Bell Laboratories -(((((([__]/__] went by looking at the tracks.
Naperville, Illinois /o-OOOOO~~ oo
att!cblph!woods ##################### FRISCO 1630 Decapod (2-10-0) IRM
More information about the Comp.unix.questions
mailing list