In console mode, curses probably won't work, in X it should work just fine.
It sounds like you are in console mode so try this and see if it works:
These are ANSI tty control codes, so-called "ANSI escape sequences" which you can google for.
I searched the post and someone said to clear the screen in C, use
printf("\033[2J"); ??
However, this doesn't work...typo or no.
What is an equivalent command to 'CLS' in DOS/'clear' in UNIX to clear the screen and go to top of screen??
Thank you. (2 Replies)
what is the syntax for clearing the screen in c ?
when i tried "Clrscr()" the CC complier does not reconise it.
please do tell me more about this.
thanking you
imma (6 Replies)
Hello guys,
I wonder if it is possible to clear out the screen in AWK.
I'm printing out mail messages and I would like every message starting on the beginning of the screen. When I use FOR loop and printf("\n") it clears out the screen but my text is somewhere in the middle of the screen.
... (2 Replies)
Hi...
i have one doubt pls...
1)can we clear the command line history in UNIX for a paricular login(scadm/root)if so how?.
2) can we see the time at which command executed.
history is showing like :
100 display
101 lock
102 exit (7 Replies)
Hi,
I'm trying to create a virtual screen, (maybe xvfb? or any other virtual screen buffer) and be able to use Screen Sharing to connect to it.
The setup is that I have a Mac Mini connected to the TV. But when my girlfriend is using Front Row, I can't use Screen Sharing at the same time from... (0 Replies)
I am unable to use clear or cls command on bash shell. I have recently installed Cygwin and am using that for practicing unix commands.
I see that I can use Ctrl + L to clear the screen. I created an alias in my .bashrc to do the same as
alias cls='^L'
This is how i defined other aliases ... (4 Replies)
I made a screen within a screen.
Is there a way to move the inner screen up one level so that it is at the same level as the first screen running from the shell? (2 Replies)
I want to clear specific part of the screen. Say for example , i am running a bash script
for i in {1..100}
do
echo "Current Record = $i"
done
if i use a clear command over there , it will clear my screen however when i scroll up i would have the old records , is there anyway in unix to... (5 Replies)
Discussion started by: chidori
5 Replies
LEARN ABOUT OPENSOLARIS
wclear
clear(3XCURSES) X/Open Curses Library Functions clear(3XCURSES)NAME
clear, erase, wclear, werase - clear a window
SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib
-R /usr/xpg4/lib -lcurses [ library... ]
c89 [ flag... ] file... -lcurses [ library... ]
#include <curses.h>
int clear(void);
int erase(void);
int wclear(WINDOW *win);
int werase(WINDOW *win);
DESCRIPTION
The clear() and erase() functions clear stdscr, destroying its previous contents. The wclear() and werase() functions perform the same
action, but clear the window specified by win instead of stdscr.
The clear() and wclear() functions also call the clearok() function. This function clears and redraws the entire screen on the next call to
refresh(3XCURSES) or wrefresh(3XCURSES) for the window.
The current background character (and attributes) is used to clear the screen.
PARAMETERS
win Is a pointer to the window that is to be cleared.
ERRORS
OK Successful completion.
ERR An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO bkgdset(3XCURSES), clearok(3XCURSES), clrtobot(3XCURSES), clrtoeol(3XCURSES), doupdate(3XCURSES), libcurses(3XCURSES), refresh(3XCURSES),
wrefresh(3XCURSES), attributes(5), standards(5)SunOS 5.11 5 Jun 2002 clear(3XCURSES)