Sponsored Content
Top Forums Shell Programming and Scripting Bash overwrites data on screen!! Post 17147 by brain_processin on Monday 11th of March 2002 06:00:13 PM
Old 03-11-2002
yes, that's right, if i just write:

printf("test\n");

then it appears properly on screen.
but what if i don't want to use \n ?
and also, the new bash line should appear _next to_ my data, but should not
overwrite it! i would like to know why...
 

10 More Discussions You Might Find Interesting

1. HP-UX

Data protector GUI gives Blank screen

Hi, Haveing a little trouble with data protector (5.5) on HP-UX (11.11, 11.23) under Xwindows Chameleon UNIX 97 (7.0 - its a old version) I am trying to get the GUI for DP up and running on a HP-UX cell manager and I have the following problem. The GUI starts up with no errors that I can... (2 Replies)
Discussion started by: Andrek
2 Replies

2. Programming

pthread_mutex_trylock() overwrites global variable on CentOS5

Hi all, I am new to linux and got problem with pthread_mutex_trylock(). I have used mutex in my code. When I try to call pthread_mutex_trylock() on RECURSIVE type of mutex it overwrites adjacent memory location (that is global variable of type structure say x, memory allocated using malloc()). ... (5 Replies)
Discussion started by: liveshell
5 Replies

3. Shell Programming and Scripting

Bash script [Press Tab] Screen Blank..

Dear Member, OLD Question --> disable-completion not solved My bash Menu script ping process problem. If ping still running and users press SCREEN is Blank... Cant Members help me.. kill signal or others scripting for my case, btw i use Linux.. Thanks, Rico My Bash Script : ... (1 Reply)
Discussion started by: carnegiex
1 Replies

4. 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

5. Shell Programming and Scripting

Redirect overwrites itself

I bet many people faced this problem before: The command below will result in a blank file: $ cat myfile | grep pattern > myfile Is there any easy way to do it? (8 Replies)
Discussion started by: rlopes
8 Replies

6. Windows & DOS: Issues & Discussions

gVim on windows 7 64 constantly overwrites symbolic and even hard links

I use sugarsync to sync my vimrc across computers. I keep the _vimrc file in a syncing folder and in my home folder, I have a symbolic link ~\_vimrc pointing to ~\Synced Docs\_vimrc. On my mac I have a .vimrc symbolic link pointing at the _vimrc file. On the pc side, every time I open the _vimrc... (3 Replies)
Discussion started by: dp88
3 Replies

7. Shell Programming and Scripting

Bash: capturing *Anything* which showed on screen

Hi, I have a simple question about I/O redirection. the question is: "How can I redirect all characters from a Bash screen to a file?" Let me describe a little more: I know about I/O Redirection in Bash. and also about stdin/stdout/stderr. something like: # ls 2>&1 1>ls.out But!... (11 Replies)
Discussion started by: siavash
11 Replies

8. Shell Programming and Scripting

Converting variable space width data into CSV data in bash

Hi All, I was wondering how I can convert each line in an input file where fields are separated by variable width spaces into a CSV file. Below is the scenario what I am looking for. My Input data in inputfile.txt 19 15657 15685 Sr2dReader 107.88 105.51... (4 Replies)
Discussion started by: vharsha
4 Replies

9. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies

10. UNIX for Beginners Questions & Answers

Help with bash escaping while using screen command

Hello, everyone. I'm currently trying to write a command system for a Minecraft server using screen. Here are the scripts I'm currently using. 0.sh #!/bin/bash screen -S Test114 -dm java -Xmx4G -jar server.jar nogui 1.sh #!/bin/bash args="$@" args2="${args@Q}" #args3=`printf '%q\n'... (2 Replies)
Discussion started by: Develon
2 Replies
curs_scr_dump(3X)														 curs_scr_dump(3X)

NAME
scr_dump, scr_restore, scr_init, scr_set - read (write) a curses screen from (to) a file SYNOPSIS
#include <curses.h> int scr_dump(const char *filename); int scr_restore(const char *filename); int scr_init(const char *filename); int scr_set(const char *filename); DESCRIPTION
The scr_dump routine dumps the current contents of the virtual screen to the file filename. The scr_restore routine sets the virtual screen to the contents of filename, which must have been written using scr_dump. The next call to doupdate restores the screen to the way it looked in the dump file. The scr_init routine reads in the contents of filename and uses them to initialize the curses data structures about what the terminal cur- rently has on its screen. If the data is determined to be valid, curses bases its next update of the screen on this information rather than clearing the screen and starting from scratch. scr_init is used after initscr or a system [see system(BA_LIB)] call to share the screen with another process which has done a scr_dump after its endwin call. The data is declared invalid if the terminfo capabilities rmcup and nrrmc exist; also if the terminal has been written to since the preceding scr_dump call. The scr_set routine is a combination of scr_restore and scr_init. It tells the program that the information in filename is what is cur- rently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function. To read (write) a window from (to) a file, use the getwin and putwin routines [see curs_util(3X)]. RETURN VALUE
All routines return the integer ERR upon failure and OK upon success. NOTES
Note that scr_init, scr_set, and scr_restore may be macros. PORTABILITY
The XSI Curses standard, Issue 4, describes these functions (adding the const qualifiers). The SVr4 docs merely say under scr_init that the dump data is also considered invalid "if the time-stamp of the tty is old" but don't define "old". SEE ALSO
curses(3X), curs_initscr(3X), curs_refresh(3X), curs_util(3X), system(3S) curs_scr_dump(3X)
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy