Sponsored Content
Top Forums Shell Programming and Scripting Bash overwrites data on screen!! Post 17144 by thehoghunter on Monday 11th of March 2002 05:09:20 PM
Old 03-11-2002
Would adding a \n for newline work for you? Check the format man page (Section 5) which was referenced in the printf man page.
thehoghunter
 

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
FFLUSH(3)						   BSD Library Functions Manual 						 FFLUSH(3)

NAME
fflush, fpurge -- flush a stream LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdio.h> int fflush(FILE *stream); int fpurge(FILE *stream); DESCRIPTION
The function fflush() forces a write of all buffered data for the given output or update stream via the stream's underlying write function. The open status of the stream is unaffected. If the stream argument is NULL, fflush() flushes all open output streams. The function fpurge() erases any input or output buffered in the given stream. For output streams this discards any unwritten output. For input streams this discards any input read from the underlying object but not yet obtained via getc(3); this includes any text pushed back via ungetc(3). RETURN VALUES
Upon successful completion 0 is returned. Otherwise, EOF is returned and the global variable errno is set to indicate the error. ERRORS
[EBADF] The stream argument is not an open stream, or, in the case of fflush(), not a stream open for writing. The function fflush() may also fail and set errno for any of the errors specified for the routine write(2). SEE ALSO
write(2), fclose(3), fopen(3), setbuf(3) STANDARDS
The fflush() function conforms to ISO/IEC 9899:1990 (``ISO C90''). BSD
June 4, 1993 BSD
All times are GMT -4. The time now is 07:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy