The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan UNIX for Dummies Questions & Answers 3 08-02-2008 02:21 PM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan High Level Programming 1 04-30-2008 10:44 AM
redirection stdin whited05 Shell Programming and Scripting 2 10-12-2005 11:03 AM
stdin device on HP dangral HP-UX 2 04-21-2005 06:50 AM
stdin marquis High Level Programming 2 04-14-2005 10:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-24-2008
Registered User
 

Join Date: Nov 2003
Posts: 9
Capturing stdin

Hi all,

Consider the following situation:
- you launch an compiled binary application from inside a unix shell which presents a text-based type user interface where you can input information ...
# echo "I am the $SHELL shell"
# I am the /bin/bash shell
# ./input
# ... imagine the binary application 'input' to present here and you type input ...

Now ... it would be straight forward to wrap the calling of the 'input' binary in a shell script which only does ./input. Everything would still work.
But ... is there a way to capture all the input that is going to the 'input' binary from inside this intermediary script, without of course influencing the correct working.
So as to actually log every character i'm typing into the binary ?

Greetz
Reply With Quote
Forum Sponsor
  #2  
Old 01-24-2008
Registered User
 

Join Date: Sep 2007
Location: Poland
Posts: 63
I don't understand it.
1. You wrote that this is a binary file - so comment lines #* are not allowed
2. You wrote some text that seems like a scripts comment because every line starts with #
What do you have as input?
Where you want to have the output?
Reply With Quote
  #3  
Old 01-24-2008
Registered User
 

Join Date: Nov 2003
Posts: 9
Yeah well,

Maybe it's a bit too advanced for you, but for those who do understand I actually found a way that does a bit too much but I got whay I needed.

Check out man pages for 'script'.

Greetz
Reply With Quote
  #4  
Old 01-24-2008
Registered User
 

Join Date: Sep 2007
Location: Poland
Posts: 63
You got the answer as clear as the question was. That's it.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:39 AM.


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

Content Relevant URLs by vBSEO 3.2.0