Sponsored Content
Top Forums Programming Print C file output both in stdout and file Post 302257971 by shamrock on Thursday 13th of November 2008 01:24:18 PM
Old 11-13-2008
fprintf() can write to both the file and the display which is associated with file stdout.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Dual output (stdout and file)

Hello everybody, Is there a more elegant way to make dual output (display on standard output and append to a file) while I'm executing a shell script, besides duplicating the echo command for every string? echo "Message..." > 1 echo "Message..." >> myfile.out Thank you for your time,... (2 Replies)
Discussion started by: AdrianM
2 Replies

2. Shell Programming and Scripting

let curl output to stdout AND save to a file

hello hackers. i have a curl process running as cgi directly pushing stdout to the client. but i want to additionally save that stream to a file at the same time. any directions madly welcome. thanks in advance (3 Replies)
Discussion started by: scarfake
3 Replies

3. Shell Programming and Scripting

print out a line from a output file

I am trying to have a script ping all the clients then output it to a file so I know which clients are off then have the next script pull the ones that are online and reboot them. This is what I am running with right now. If there is something KISS then by all means please let me know. ... (3 Replies)
Discussion started by: deaconf19
3 Replies

4. Shell Programming and Scripting

Print permissions for a file in output

hi i m trying to print the permissions for a file in output echo name read name touch name.txt permission=$((ls -l $name.txt)) echo permission please suggest where i went wrong? (2 Replies)
Discussion started by: angel12345
2 Replies

5. Shell Programming and Scripting

Print to both file and stdout

Using echo command, send output to both places. I think I knew this but forgot. Thanks in advance (2 Replies)
Discussion started by: stevensw
2 Replies

6. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

7. Shell Programming and Scripting

File descriptors, redirecting output, and stdout

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

8. Shell Programming and Scripting

Run a program-print parameters to output file-replace op file contents with max 4th col

Hi Friends, This is the only solution to my task. So, any help is highly appreciated. I have a file cat input1.bed chr1 100 200 abc chr1 120 300 def chr1 145 226 ghi chr2 567 600 unix Now, I have another file by name input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies

9. Shell Programming and Scripting

Print the output with different file names

I have a python script that gives output called test.png. By using the following command I run the script every 2 seconds. What is the easiest way to save the output as follows ( test.png (1st output), tes1.png (second output), tes2.png ....) Command I i use while sleep 2; do python... (1 Reply)
Discussion started by: quincyjones
1 Replies

10. UNIX for Beginners Questions & Answers

Output of until to file versus stdout

Why does this until false; do history | head -5; done result in a stdout infinite loop, yet until false; do history | head -5 > hist5; done only writes it once to file hist5? Furthermore, I can hear the hard drive working on the 2nd command until I end the process, but the history | head -5 is... (1 Reply)
Discussion started by: Xubuntu56
1 Replies
GPIV_NSTRAIN(1) 					      General Commands Manual						   GPIV_NSTRAIN(1)

NAME
gpiv_nstrain - Calculates normal strain from PIV data. SYNOPSIS
gpiv_nstrain [-d N] [-h | --help] [-p | --print] [-g | --g] [--no_g ] [-v | --version] [filename] < stdin > stdout DESCRIPTION
gpiv_nstrain calculates the normal strain from PIV data. You can choose from several differential schemes: central differentiation, least squares, and Richardson extrapolation. The output can be generated as ASCII data containing four columns or as GNUPlot Data format that allows one to view/print the data as contour plots. The configuration parameters (containing the POST key) may be overruled by the command line options, as explained below. Options -d N Differential type to be used: central difference (N=0), least squares (N=1), Richardson interpolation (N=2), circulation method (N=3) -h | --help On-line help -p | --print Print parameters, command line options and eventually used input and output filenames to stdout. The output is identic of file- name.par, in case filename is used. -g Show contour plot of the output with gnuplot. --no_g Suppresses to show contour plot of the output with gnuplot. -v | --version Print version information on standard output, then exit successfully. filename Input PIV data file. Overrides stdin and stdout. The output will be written to filename.nstr. Parameters are stored in filename.par and may be used for future use by including them in ./gpivrc. SEE ALSO
gpivtools AUTHOR
Gerber Van der Graaf 8 November 2006 GPIV_NSTRAIN(1)
All times are GMT -4. The time now is 09:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy