06-26-2012
Modify your C program to either disable the buffer for stdout, print a newline more often, or flush its output more often.
stderr and stdout are intended to be separate, however. stdout is for data, stderr is for errors. Why not just print everything you want in the logfile to stdout?
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In bash, I need to send the STDOUT and STDERR from a command to one file, and then just STDERR to another file. Doing one or the other using redirects is easy, but trying to do both at once is a bit tricky. Anyone have any ideas? (9 Replies)
Discussion started by: jshinaman
9 Replies
2. Shell Programming and Scripting
Friends
I have to redirect STDERR messages both to screen and also capture the same in a file.
2 > &1 | tee file works but it also displays the non error messages to file, while i only need error messages.
Can anyone help?? (10 Replies)
Discussion started by: vikashtulsiyan
10 Replies
3. Shell Programming and Scripting
Is there a way to redirect all stdout to a file implicitly - like defining stdout=/home/me/process.log - so that all "echo" commands in several scripts/subscripts are written to that file; instead of having to edit all scripts to redirect the "echo" (e.g. echo 'This is a test ' >>... (1 Reply)
Discussion started by: ALTRUNVRSOFLN
1 Replies
4. UNIX for Dummies Questions & Answers
I have an executable that, depending on its input, outputs to either one file or several. It usually prints nothing on screen. The usual way to call this program is to specify an input and output filenames, like this:
./executable.exe -i inputfile -o outputfileIt will then try to use the output... (1 Reply)
Discussion started by: aplaydoc
1 Replies
5. Shell Programming and Scripting
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
Discussion started by: ocirne94
2 Replies
6. Shell Programming and Scripting
Hello,
I have a script (videostream.sh) which invokes the GStreamer command-line tool gst-launch with all the correct command line parameters. When I invoke this program, I add the '&' character at the end to make it a background task, so that my script can complete and exit, i.e.
gst-launch... (1 Reply)
Discussion started by: salukibob
1 Replies
7. Shell Programming and Scripting
I have a simple bash script that prints sth every 5 seconds. What I do is the following. I redirect the output of the script to a file, tail the file and see that it works and then from another console I delete the file where the output is redirected to. Even though I have deleted the file, the... (2 Replies)
Discussion started by: igurov
2 Replies
8. Shell Programming and Scripting
Hello all. I've been lurking here for a year or two and finally decided to post.
I need some assistance with file descriptors, stdout, and redirecting output. I've searched through a number of very helpful threads here (unfortunately I can't link to any of them yet due to my low post count...),... (2 Replies)
Discussion started by: Michael_K
2 Replies
9. Shell Programming and Scripting
I have to redirect STDERR messages both to screen and also capture the same in a file but STDOUT only to the same file.
I have searched in this formum for a solution, but something like
srcipt 3>&1 >&2 2>&3 3>&- | tee errs
doesn't work for me...
Has anyone an idea??? (18 Replies)
Discussion started by: thuranga
18 Replies
10. Shell Programming and Scripting
Hello,
I'm strugling with some redirecting and all help is apreciated.
The following program is working as expected, but the result of the AT command doesn't go to any file.
Thanks in advance for the help.
#!/bin/bash
modem=/dev/ttyUSB1
file=/root/imsi.txt
# print error to stderr and exit... (4 Replies)
Discussion started by: cleitao
4 Replies
LEARN ABOUT DEBIAN
gl-117
GL-117(6) gl-117 overview GL-117(6)
NAME
gl-117 - an OpenGL action flight simulator
SYNOPSIS
gl-117 [-dlevel -h -v]
DESCRIPTION
gl-117 is an OpenGL and SDL based action flight simulator written in ISO C++. Enter the Eagle Squadron and succeed in several challanging
missions leading though different landscapes. Five predefined levels of video quality and an amount of viewing ranges let you perfectly
adjust the game to the performance of your system. The game provides joystick and mouse support, sound effects, and music.
OPTIONS
-dlevel
Set the debug level to level in [0..5]. '0' means quiet and will avoid any output, '1' will log fatal errors causing the program to
crash on stderr, '2' will also print exceptions on stderr, '3' will add warnings on stdout, '4' prints additional information (pre-
defined) on stdout, and '5' gives developer specific messages on stdout.
-h Print a short summary on stdout and then quit immediately.
-v Display the version number of gl-117 and then quit immediately.
CONFIGURATION
gl-117 uses a predefined working directory ".gl-117" in the user's home directory to load and store all savegame files and read the plain
text configuration files "conf" and "conf.interface". If there are no config files available, gl-117 will create them using standard set-
tings. The contents of the files are quite self-explanatory.
DOCUMENTATION
Please look at the gl-117 user manual (gl-117.pdf) for installation instructions and further gameplay related descriptions.
COPYRIGHT
gl-117 is distributed under the terms of the GPL.
AUTHORS
Thomas A. Drexl (tom.drexl@gmx.de)
27 February 2003 GL-117(6)