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 > 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 and shell scripting languages 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 05:21 PM
How to write to stdin of another program (program A -> [stdin]program B) vvaidyan High Level Programming 1 04-30-2008 01:44 PM
redirection stdin whited05 Shell Programming and Scripting 2 10-12-2005 02:03 PM
stdin device on HP dangral HP-UX 2 04-21-2005 09:50 AM
stdin marquis High Level Programming 2 04-14-2005 01:49 PM

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 01-24-2008
domivv domivv is offline
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
  #2 (permalink)  
Old 01-24-2008
adderek adderek is offline
Registered User
  
 

Join Date: Sep 2007
Location: Poland
Posts: 110
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?
  #3 (permalink)  
Old 01-24-2008
domivv domivv is offline
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
  #4 (permalink)  
Old 01-24-2008
adderek adderek is offline
Registered User
  
 

Join Date: Sep 2007
Location: Poland
Posts: 110
You got the answer as clear as the question was. That's it.
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 07:19 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