![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
You got the answer as clear as the question was. That's it.
|
|||
| Google The UNIX and Linux Forums |