![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [ C++ ] Drawing Program. | Max_Payne | High Level Programming | 12 | 12-23-2007 03:06 AM |
| Still Time Today to Join the $5000 AJAXWorld Drawing - SYS-CON Media | iBot | UNIX and Linux RSS News | 0 | 08-24-2007 11:50 AM |
| Line-drawing character! | zecoj | High Level Programming | 5 | 03-10-2002 11:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
It is possible to arbitrarily set the cursor to some position, then write from there. See the TERMCAP database and tput (man tput) how that works and which limitations this procedure has.
Hope this helps bakunin |
|
|||||
|
Just for fun...
Code:
awk -v X=12 -v Y=40 -v radius=12 'BEGIN{
pi=3.142857
system("tput clear")
for(i=0 ;i<=359 ;i++){
cmd=sprintf("tput cup %s %s", \
int(.5 + X + (sin(i*pi/180)*radius)), \
int(.5 + Y + (cos(i*pi/180)*radius)) )
system(cmd)
printf "*"
}
system("tput home")
}'
Code:
*******
**** ***
** **
** **
** *
** **
** **
* *
* *
* **
* *
* *
* *
* *
* *
** *
* *
* *
** **
** **
** **
** **
** **
*** ***
*******
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|