The UNIX and Linux Forums  

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
redirection DNAx86 Shell Programming and Scripting 9 04-18-2008 03:24 PM
sed redirection myle UNIX for Dummies Questions & Answers 3 03-12-2008 07:04 PM
redirection problem user_prady Shell Programming and Scripting 4 12-10-2007 02:42 AM
Complex Pipeline/Redirection/Regular Expression problem netmaster UNIX for Dummies Questions & Answers 1 11-29-2005 12:55 AM
facing a problem in redirection vivekshankar UNIX for Dummies Questions & Answers 4 05-23-2005 01:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-13-2005
vibhor_agarwali vibhor_agarwali is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 259
Redirection Problem

I was simply trying to redirect some output in a log file but it foxed me.

truss a.out > log

It gave only the output of the a.out which was only a simple print "Hello"

Then I tried

truss a.out 2&1>a
echo `truss a.out` > a

All failed.

What am i missing.
Thanks
  #2 (permalink)  
Old 07-13-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Try this.

Code:
truss a.out &> log
vino
  #3 (permalink)  
Old 07-13-2005
vibhor_agarwali vibhor_agarwali is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 259
Phew,

So simpleeeeeeeeeeeeeeeeeeeee

By the way, can you explain this to me.
  #4 (permalink)  
Old 07-13-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Check out man bash under the title

Redirecting Standard Output and Standard Error

Basically it says, redirect standard output and standard error to output.

Vino
  #5 (permalink)  
Old 07-13-2005
vibhor_agarwali vibhor_agarwali is offline
Registered User
  
 

Join Date: Jan 2005
Posts: 259
Thanks

Bye
  #6 (permalink)  
Old 07-13-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Another way to do it (and also find the answer to the original redirection question....)

man truss

Code:
-o outfile
           File to be used for the trace output. By default,  the
           output goes to standard error.
Cheers
ZB
Closed Thread

Bookmarks

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 05:44 AM.


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