Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet thread from alt.ascii-art, started 10 Oct 1999.
 _   _                     _        _             _     _           
| | | |___  ___ _ __   ___| |_     / \   _ __ ___| |__ (_)_   _____ 
| | | / __|/ _ \ '_ \ / _ \ __|   / _ \ | '__/ __| '_ \| \ \ / / _ \
| |_| \__ \  __/ | | |  __/ |_   / ___ \| | | (__| | | | |\ V /  __/
 \___/|___/\___|_| |_|\___|\__| /_/   \_\_|  \___|_| |_|_| \_/ \___|
DRAW square box

DRAW square box

alt.ascii-art · 5 messages · 10 Oct 1999 - 13 Oct 1999
Pete <hdp...@sympatico.ca> 10 Oct 1999 00:00 · permalink · report
an anyone please! tell me how to draw a square box with ascii charaters
using while loops   , echoing ascii characters from octal values....In
unix bash shell
im using redhat 6.0  I need help!   I need to see an example from
somewhere
Thank you ..Peter

David Riley <dav...@dmriley.demon.co.uk> ASCII art 11 Oct 1999 00:00 · permalink · report
Pete <hdp...@sympatico.ca> writes:

> an anyone please! tell me how to draw a square box with ascii charaters
> using while loops   , echoing ascii characters from octal values....In
> unix bash shell

Cool idea!

first parameter is width (default 5), second is length (default width)


===========8<===================================
#!/bin/bash

WIDTH=$1
WIDTH=${WIDTH:-5}

LENGTH=$2
LENGTH=${LENGTH:-${WIDTH}}

i=0

echo -n ' '
while [ $i -lt `expr ${WIDTH} - 2` ]; do
    i=`expr $i + 1`
    echo -n "_"
done
echo

i=0

while [ $i -lt `expr ${LENGTH} - 1` ]; do
    i=`expr $i + 1`
    echo -n "|"
    j=0
    while [ $j -lt `expr ${WIDTH} - 2` ]; do
	j=`expr $j + 1`
	echo -n ' '
    done
    echo "|"
done

i=0

echo -n "|"
j=0
while [ $j -lt `expr ${WIDTH} - 2` ]; do
    j=`expr $j + 1`
    echo -n "_"
done
echo "|"

echo
=============8<===============================

HTH :-)

-- 
David Riley 		dav...@dmriley.demon.co.uk
ObAscii: No such file or directory
core dumped

mostyn <mos...@ren.ecr.mu.oz.au> ASCII art 12 Oct 1999 00:00 · permalink · report
On Sun, 10 Oct 1999, Pete wrote:

> an anyone please! tell me how to draw a square box with ascii charaters
> using while loops   , echoing ascii characters from octal values....In
> unix bash shell
> im using redhat 6.0  I need help!   I need to see an example from
> somewhere
> Thank you ..Peter

wtf would you want to do that?  

m.
--
My fading voice sings of love,           /*-----------------------*/
But she cries to the clicking of time.   /* Surely you're joking, */
Oh, time.  Wait in the fire...           /* mos...@ecr.mu.oz.au  */
	-- Jeff Buckley, "Grace"         /*-----------------------*/

On Tue, 12 Oct 1999 11:49:31 +1000, mostyn <mos...@ren.ecr.mu.oz.au>
wrote:

>On Sun, 10 Oct 1999, Pete wrote:
>
>> an anyone please! tell me how to draw a square box with ascii charaters
>> using while loops   , echoing ascii characters from octal values....In
>> unix bash shell
>> im using redhat 6.0  I need help!   I need to see an example from
>> somewhere
>> Thank you ..Peter
>
>wtf would you want to do that?  

Because it's geeky. 

.oO(*)Oo. Hey! I made a tiara!


-- 
Jan-Erik Finnberg    whe...@icenet.no.spam.please.fi     ICQ:49316651

Check out my FFVII web page at http://www.saunalahti.fi/~wheany/FFVII/
for "official" FF7 Midis, FF7 text viewer by CzarDragon, DCodelgp by ME 
and not much more!

Pete <hdp...@sympatico.ca> 13 Oct 1999 00:00 · permalink · report
No because Im had to do it in my unix class it's part of a menu that takes
user input
to define the width and height of the box that will  become a menu of some
type
i was having trouble making it so this guy helped me out and he's F____in good
too!

Jan-Erik Finnberg wrote:

> On Tue, 12 Oct 1999 11:49:31 +1000, mostyn <mos...@ren.ecr.mu.oz.au>
> wrote:
>
> >On Sun, 10 Oct 1999, Pete wrote:
> >
> >> an anyone please! tell me how to draw a square box with ascii charaters
> >> using while loops   , echoing ascii characters from octal values....In
> >> unix bash shell
> >> im using redhat 6.0  I need help!   I need to see an example from
> >> somewhere
> >> Thank you ..Peter
> >
> >wtf would you want to do that?
>
> Because it's geeky.
>
> .oO(*)Oo. Hey! I made a tiara!
>
> --
> Jan-Erik Finnberg    whe...@icenet.no.spam.please.fi     ICQ:49316651
>
> Check out my FFVII web page at http://www.saunalahti.fi/~wheany/FFVII/
> for "official" FF7 Midis, FF7 text viewer by CzarDragon, DCodelgp by ME
> and not much more!

About this thread. These messages were posted publicly to the newsgroup alt.ascii-art in 1999 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post