LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 02-13-2013, 10:16 PM   #1
hnasr2001
LQ Newbie
 
Registered: Nov 2012
Posts: 16
Blog Entries: 1

Rep: Reputation: Disabled
How may I get the information from the file and give to the executable file?


I would like to describe what I wanted to do in order to get help;
There is a executable file and when I execute the file it ask me a few question, I don't want to type the answers, I have them in a file.

Question: How may I get the information from the file and give to the executable file?
For example, the executable file asks for ip address, I have the answer in a file, and I want to get the ip address from the file and give it to the executable file.
 
Old 02-13-2013, 10:26 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,232

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
It depends ...

1. some programs allow you to specify a cfg file to read; check the docs for the program.
2. if its purely interactive only, you'll need the expect tool http://linux.die.net/man/1/expect eg http://www.linuxjournal.com/article/3065?page=0,0, http://www.thegeekstuff.com/2010/10/expect-examples/
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Using Expect/TCL to move contents of a text file to an executable file jefsa Linux - Newbie 4 04-20-2012 10:43 AM
[SOLVED] How would I convert an arbitrary binary file into a Linux executable file? ootawata Programming 8 02-21-2010 11:21 PM
LXer: Practical Steganography Part-1: Hiding information in Binary Executable File LXer Syndicated Linux News 0 02-14-2008 11:41 AM
Howto convert bin file to a executable DOS file lilzz Linux - Newbie 5 08-04-2006 12:03 AM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM


All times are GMT -5. The time now is 10:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration