The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Redirecting part of output to stdout Legend986 Shell Programming and Scripting 2 10-17-2008 03:20 PM
implicitly redirecting stdout to a file ALTRUNVRSOFLN Shell Programming and Scripting 1 09-23-2008 03:42 PM
Redirecting STDERR message to STDOUT & file at same time vikashtulsiyan Shell Programming and Scripting 10 04-09-2008 02:34 PM
redirecting STDOUT & STDERR jshinaman Shell Programming and Scripting 9 06-22-2007 12:04 AM
Printing outputs using awk. Krrishv Shell Programming and Scripting 4 01-09-2007 07:31 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-06-2009
aplaydoc aplaydoc is offline
Registered User
  
 

Join Date: Feb 2009
Location: Montreal, Canada
Posts: 10
Redirecting several outputs to /dev/stdout

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:

Code:
./executable.exe -i inputfile -o outputfile
It will then try to use the output filename exactly if it needs to output to one file, or it will start appending -01, -02, -03, -04 etc... to the name and create as many outputs as needed otherwise. (These are not a combination of output and error files, they are all output files only)


I want to force output everything from it on screen. If I change my code to:

Code:
./executable.exe -i inputfile -o /dev/stdout
then it will only work if the program wants to create one output file. But I get the error

Code:
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::insert
Abort
in case it wants to output to several files. Is there another trick to force all outputs from it to print on screen??

Thanks
  #2 (permalink)  
Old 03-06-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,928
Since it is the program that controls the opening and closing of its output files, no.
Sponsored Links
Closed Thread

Bookmarks

Tags
force output to screen, multiple files, multiple outputs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:54 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0