Sponsored Content
Full Discussion: clear screen
Top Forums Programming clear screen Post 25487 by killerserv on Wednesday 31st of July 2002 07:02:05 AM
Old 07-31-2002
yes clrscr() works for me. I tried using curces.h

#include <curses.h>

void clrscr()
{

in the end of your code use

clear();
refresh();
}
 

10 More Discussions You Might Find Interesting

1. Programming

How to clear screen

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)
Discussion started by: giannicello
2 Replies

2. Programming

clear screen in g++

How do I clear screen in g++ I've included curses and tried compile with lcurses as per gcc but fails, I can clear by using system("clear") but would prefer to use the curses library if possible. (2 Replies)
Discussion started by: gefa
2 Replies

3. Shell Programming and Scripting

Clear screen in NAWK

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)
Discussion started by: petoSVK
2 Replies

4. Programming

how to clear screen in GDB session

hi , Could any one tell me the command for clearing the screen in GDB session (1 Reply)
Discussion started by: useless79
1 Replies

5. UNIX for Dummies Questions & Answers

how to clear history

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)
Discussion started by: gincemathew
7 Replies

6. OS X (Apple)

Virtual screen accessed by Screen Sharing

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)
Discussion started by: linge
0 Replies

7. Shell Programming and Scripting

Clear Screen Command for BASH shell

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)
Discussion started by: erora
4 Replies

8. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

9. UNIX for Dummies Questions & Answers

Accidentally made a screen within a screen - how to move it up one level?

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)
Discussion started by: phpchick
2 Replies

10. Shell Programming and Scripting

Clear specific part of the screen

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
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)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy