Sponsored Content
Full Discussion: System("clear") error
Top Forums Programming System("clear") error Post 302878122 by Corona688 on Wednesday 4th of December 2013 04:14:47 PM
Old 12-04-2013
You do not need system() to print escape codes in C:

Code:
printf("\x1b[2J\x1b[H");  fflush(stdout);

This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

"Web-based System Manager" error

Hi, I have a problem with the "Web-based System Manager" on AIX 5.3 ML04. When selecting category "File Systems" and the "Overview and Tasks", I get a popup with the following error: : com.ibm.jcb.RemoteSourceException: The remote call failed; nested exception is:... (1 Reply)
Discussion started by: Ebbi
1 Replies

2. UNIX for Dummies Questions & Answers

"@" will clear the current line in terminal

I just found that the current command line will be cleared when trying to input the "@" sign to the terminal. I checked current alias, but found nothing. Would you please provide some suggestion about it? (4 Replies)
Discussion started by: sleepy_11
4 Replies

3. HP-UX

ERROR: more than one instance of overloaded function "vprintf" has "C" linkage

Hi people! I've got this own library: -------------------------------------------- Personal.h -------------------------------------------- #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdarg.h> #include <string.h> ... (0 Replies)
Discussion started by: donatoll
0 Replies

4. Filesystems, Disks and Memory

Error:"File system full"

Hi, I'm getting an error with my filesystems. After /dev/dsk/c0t0d0s7.......................100%............/export/home and #ls -l drwxr----.......................512......TT_DB drw..............................8192.....lost+found drw...............................512......oracle... (10 Replies)
Discussion started by: bacanaks
10 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. UNIX for Dummies Questions & Answers

[Solved] How to clear "history" command entries??

As in the title, how to clear the history entries? For eg: if i enter history, series of linux commands getting displayed from day 1. I need to clear those entries and want linux commands to be stored freshly. Thanks in advance (6 Replies)
Discussion started by: karthick nath
6 Replies

8. Shell Programming and Scripting

awk "date" and "system" command

Hello experts! I need your help please I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.: 2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well. So I want to execute date -d '2016-11-25 03:14:50' ... (2 Replies)
Discussion started by: phaethon
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies
FFLUSH(3)						     Linux Programmer's Manual							 FFLUSH(3)

NAME
fflush - flush a stream SYNOPSIS
#include <stdio.h> int fflush(FILE *stream); DESCRIPTION
The function fflush forces a write of all user-space 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. For a non-locking counterpart, see unlocked_stdio(3). RETURN VALUE
Upon successful completion 0 is returned. Otherwise, EOF is returned and the global variable errno is set to indicate the error. ERRORS
EBADF Stream is not an open stream, or is not open for writing. The function fflush may also fail and set errno for any of the errors specified for the routine write(2). NOTES
Note that fflush() only flushes the user space buffers provided by the C library. To ensure that the data is physically stored on disk the kernel buffers must be flushed too, e.g. with sync(2) or fsync(2). CONFORMING TO
The function fflush() conforms to ANSI X3.159-1989 (``ANSI C''). SEE ALSO
fsync(2), sync(2), write(2), fclose(3), fopen(3), setbuf(3), unlocked_stdio(3) BSD MANPAGE
1993-11-29 FFLUSH(3)
All times are GMT -4. The time now is 10:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy