Sponsored Content
Top Forums UNIX for Advanced & Expert Users redirect to both file and std output at the same time Post 302239470 by send2sridhar on Tuesday 23rd of September 2008 06:43:45 PM
Old 09-23-2008
Power redirect to both file and std output at the same time

hello

can some one please help me to redirect the output of a command to both std output and a file. this is little urgent.

sridhar
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Redirect time output

Hello All, I am trying to write a script that would capture the output of time command on a Sun machine. I have tried these commands $ time ls > out $ time ls 2> out I just get the ls output in the out file for the first one. Thanks for any help Chuck (2 Replies)
Discussion started by: cbeech
2 Replies

2. UNIX for Dummies Questions & Answers

Redirect the Time result to a test file

I need to store process runtime into a file, currently the command i use was: time ls >> abc.txt however, this command store the executed result of ls into the txt file but not the time command result. Anyone know how to store the "time ls" result? Please advise me! Thanks in advance :) (5 Replies)
Discussion started by: mistella
5 Replies

3. Shell Programming and Scripting

How to redirect std out and std err to same file

Hi I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this. Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies

4. Shell Programming and Scripting

How to redirect std err and out to log file for multi-commands?

The following command does not work under cygwin bash. ant debug >log 2>&1 && ant image >>log 2>>&1 & pid=$! It gives the error "-bash: sysntax error near unexpected token '&'". Is there a way I can redirect std output and std error to file "log" for both the commands "ant debug" and "ant... (1 Reply)
Discussion started by: siegfried
1 Replies

5. Shell Programming and Scripting

Real time log file redirect

Hi all, i would like to write the shell script program, it can monitor the access_log "real time" when the access_log writing the line contain "abcdef" the program will be "COPY" this line into a file named "abcdef.txt", do the same thing if the contain "123456" "COPY" it into a file named... (3 Replies)
Discussion started by: eric_wong_ch
3 Replies

6. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

7. AIX

Redirecting Both to a file and std output

Hello Friends, Can some one help me how to redirect output of a file to both a file and std output? All the help would be greatly appreciated. Regards Sridhar (1 Reply)
Discussion started by: send2sridhar
1 Replies

8. Shell Programming and Scripting

redirect time command output to file (cygwin bash)

I have set up a bash script to run a long list of things that I need to time. I would like to redirect the output of time to a file. I have set it up like, echo "Runtimes for servlet 4, 100K structures" > test_times.txt echo "" >> test_times.txt echo "runs where N=10" >> test_times.txt echo... (7 Replies)
Discussion started by: LMHmedchem
7 Replies

9. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

10. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
FBB::IOStream(3bobcat)					   std::istream and std::ostream				    FBB::IOStream(3bobcat)

NAME
FBB::IOStream - Combines std::istream and std::ostream features SYNOPSIS
#include <bobcat/iostream> Linking option: -lbobcat DESCRIPTION
This class combines the features of the std::istream and std::ostream classes. The std::istream and std::ostream may be physically differ- ent streams. FBB:IOStream objects may, e.g., be associated with streams wrapped around pipes (see, e.g., FBB::IfdStream and FBB::OFd- Stream), to construct bi-directional pipes. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
FBB::IOStreambuf (private inheritance), std::istream, std::ostream CONSTRUCTORS
o IOStream(): The default constructor constructs an empty FBB::IOStream objects. It should not be used before its open member (see below) was called. o IOStream(std::istream &in, std::ostream &out): This constructor associates the IOStream object with a std::istream and a std::ostream. All output operations will be passed on to the std::ostream, all input operations to the std::istream. The streams passed to IOStream should outlive the IOStream object. This constructor performs the actions of the default constructor and then calls the IOStream::open member De copy constructor is avail- able as well. MEMBER FUNCTIONS
All members of std::istream and std::ostream are available, as FBB::IOStream inherits from these classes. Furthermore, when switching between std::istream and std::ostream operations, no intermediate seekg() or seekp() operation will normally be required, since the base classes will normally be associated with physically different streams. o void open(std::istream &in, std::ostream &out): This member (re)associates the IOStream object with a std::istream and a std::ostream. All output operations will be passed on to the std::ostream, all input operations to the std::istream. The streams passed to IOStream() should outlive the IOStream object. If this member is called for an IOStream object already associated with an std::ostream object, the already associated std::ostream object is flushed before setting up the new association. o void clear(): This member clears the error states of the associated std::istream and std::ostream objects. EXAMPLE
See the example provided with process(3bobcat). FILES
bobcat/iostream - defines the class interface SEE ALSO
bobcat(7), ifdstream(3bobcat), iostreambuf(3bobcat), ofdstream(3bobcat), process(3bobcat) BUGS
None Reported. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::IOStream(3bobcat)
All times are GMT -4. The time now is 04:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy