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
cut -d' ' -f7,8 on the stdout of ls -al yongho Shell Programming and Scripting 9 02-15-2007 08:28 AM
sum numbers from stdout umen Shell Programming and Scripting 1 08-05-2006 04:26 AM
ksh - get stdout name as variable mhcueball2 Shell Programming and Scripting 4 07-15-2005 07:45 AM
pipe and stdout vascobrito UNIX for Dummies Questions & Answers 3 02-02-2004 04:20 AM
where does stdout link to? jiangyanna Filesystems, Disks and Memory 7 06-18-2003 08:22 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-24-2008
Registered User
 

Join Date: Apr 2008
Posts: 5
Stumble this Post!
not able to capture STDOUT

I am using a third party API to get some real time feed. When I run the command it shows the results properly:

etd@mhs-apps5009 $ mamalistenc -m lbm -tport mamaqa -S MLALERTS -s KANA wFinancialStatus
Type CTRL-C to exit.
(null).MLALERTS.KANA Type: INITIAL Status OK
wFinancialStatus | 266 | CHAR | SDB-Restriction=4

<pressed ctrl-c>
etd@mhs-apps5009 $

But, when I try to redirect the output to a file nothing get captured.

etd@mhs-apps5009-d $ mamalistenc -m lbm -tport mamaqa -S MLALERTS -s KANA wFinancialStatus >out.txt

<pressed ctrl-c>
etd@mhs-apps5009-d $

Any ideas??

thanks for any help.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-24-2008
vbe vbe is offline
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 540
Stumble this Post!
Have you tried to use tee command yet?
Reply With Quote
  #3 (permalink)  
Old 04-24-2008
Registered User
 

Join Date: Apr 2008
Posts: 5
Stumble this Post!
thanks vbe for pointing on tee.

well, its working to an extent, and only when I am invoking the command through a shell script like ./env_conf.sh |tee out.txt

Still wondering whats wrong with the command:
mamalistenc -m lbm -tport mamaqa -S MLALERTS -s KANA wFinancialStatus| tee out.txt
Reply With Quote
  #4 (permalink)  
Old 04-24-2008
vbe vbe is offline
Moderator
 

Join Date: Sep 2005
Location: Switzerland
Posts: 540
Stumble this Post!
Do a ps -ef |grep mamali
and then of the PID found, you may find why the tee is not giving expected output:
a (or more) new process(es) launched?
Reply With Quote
  #5 (permalink)  
Old 04-24-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,650
Stumble this Post!
On a tangential note, would it be useful at all to run it under script instead?
Reply With Quote
  #6 (permalink)  
Old 04-25-2008
Registered User
 

Join Date: Apr 2008
Posts: 5
Stumble this Post!
yeah, now i am able to capture the output in a file.

script -q -c "mamalistenc -m lbm -tport mamaqa -S MLALERTS -s KANA wFinancialStatus" out.txt >/dev/null

thanks for every help
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0