Print on the screen a table in ascii

Hi

Is there some kind of generator in the internet which could help me to create a table where i will place some values.

Trying to do this with echo cmd, but maybe you will suggest me some generator fo r this.

thx.

---------- Post updated at 10:59 AM ---------- Previous update was at 10:47 AM ----------

Up to now I have sth like this :
---------------------------------

--------------------------------------------------------------------------------------------
| ####### |                 Emails                |              Attachments               |
| ####### |                                       |                                        |
--------------------------------------------------------------------------------------------
| Miesiac | Ilosc plikow | Wielkosc plikow (B/KB) | Ilosc plikow | Wielkosc plikow ( B/KB) |
|         |              |                        |              |                         |
--------------------------------------------------------------------------------------------

Use printf.

Hi.

See also [gt]roff table generators tbl, gtbl, t2t (html), many wiki applications.

Here is a simple example of tbl and groff in a script file s1:

#!/bin/sh

F=${1-2.tbl}

echo
echo " Input file $F (use TABS to separate entries):"
cat -A $F

echo
echo " Results (empty lines omitted):"
echo

tbl $F |
groff -T ascii |
grep -v '^$'

exit 0

producing:

% ./s1

 Input file 2.tbl (use TABS to separate entries):
Now is the time$
for all good men$
to come to the aid$
of their country.$
.TS$
allbox;$
c c c$
l l l.$
Language^IAuthors^IRuns on$
Fortran^IMany^IAlmost anything$
PL/1^IIBM^I360/370$
C^IBTL^I11/45,H6000,370$
BLISS^ICarnegie-Mellon^IPDP-10,11$
IDS^IHoneywell^IH6000$
Pascal^IStanford^I370$
.TE$

 Results (empty lines omitted):

Now  is  the  time  for  all good men to come to the aid of their
country.
+---------+-----------------+-----------------+
|Language |     Authors     |     Runs on     |
+---------+-----------------+-----------------+
|Fortran  | Many            | Almost anything |
+---------+-----------------+-----------------+
|PL/1     | IBM             | 360/370         |
+---------+-----------------+-----------------+
|C        | BTL             | 11/45,H6000,370 |
+---------+-----------------+-----------------+
|BLISS    | Carnegie-Mellon | PDP-10,11       |
+---------+-----------------+-----------------+
|IDS      | Honeywell       | H6000           |
+---------+-----------------+-----------------+
|Pascal   | Stanford        | 370             |
+---------+-----------------+-----------------+

See man pages for details ... cheers, drl