s there anyway in unix to just clear a single line everytime
You can overwrite the same line every time by printing a carriage return instead of a newline, the cursor will return to the beginning of the line but not travel down to the next line.
Note this does not clear the line per se, you would need to print blank spaces or use an escape sequence.
Things like setting up a scrolling region inside your terminal will also prevent scrollback but are not compatible with all terminals.
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)
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)
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)
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)
User with moderate experience:
I run a script (my addiction is KSH) that reads a file and reports certain parameters back to the user on screen and also piped to a file. The file(s) I read is/are located under different directories, and is usually called the same thing. Sometimes not. For... (3 Replies)
Hi,
I am writing a menu driven Korn script where I am getting some input from the users (host details, like Hostname, HBA WWN, Devices etc...). I face a challenge when the number of input lines goes past my window size. For this reason, I am planning to use a part of the screen for user input, say... (3 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
There is away to make a window pane a specific size. I just forgot how to do it.
Something like this:
Ctrl-A : split-window -l xx -h xx
Anyone know the right way to do this?
Thanks. (1 Reply)
Discussion started by: ignatius
1 Replies
LEARN ABOUT NETBSD
curses_deleteln
CURSES_DELETELN(3) BSD Library Functions Manual CURSES_DELETELN(3)NAME
curses_deleteln, deleteln, wdeleteln -- curses delete single line routines
LIBRARY
Curses Library (libcurses, -lcurses)
SYNOPSIS
#include <curses.h>
int
deleteln(void);
int
wdeleteln(WINDOW *win);
DESCRIPTION
These functions delete a single line from stdscr or from the specified window.
The deleteln() function deletes the screen line containing the cursor in the stdscr. The wdeleteln() function is the same as the deleteln()
function, excepting that the line is deleted from the window specified by win.
All lines following the deleted line are moved up one line toward the cursor. The last line of the window is cleared. The cursor position
is unchanged.
If a scrolling region has been set with the setscrreg() or wsetscrreg() functions and the current cursor position is inside the scrolling
region, then only the lines from the current line to the bottom of the scrolling region are moved up and the bottom line of the scrolling
region cleared.
The functions deleteln() and wdeleteln(win) are equivalent to winsdelln(stdscr, -1) and winsdelln(win, -1) respectively.
RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following
values:
OK The function completed successfully.
ERR An error occurred in the function.
SEE ALSO curses_insdelln(3), curses_insertln(3), curses_scroll(3)STANDARDS
The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.
HISTORY
The Curses package appeared in 4.0BSD.
BSD August 12, 2002 BSD