Scripting with applications


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Scripting with applications
# 1  
Old 08-04-2010
Question Scripting with applications

Hi,
I am developing a script that invokes a program, and that program is going to prompt for some input every now and then based on some parameters.

My script shall provide input to the program, automatically, by processing the text output by the program..

say..
when the program asks

"username:" the script shall enter "griffin"
"room number:" the script shall enter 23
"what is the temperature at XX:XX hrs": the script shall refer to a file where a list of temperatures with corresponding times are present to give the appropriate answer.

For this, my script must be able to process the text output/prompted by the program.

How do I do this? Any help is much appreciated.

Thanks.
# 2  
Old 08-04-2010
what will be the format of temperature file.

what will be the format of temperature file.
# 3  
Old 08-04-2010
Can't the script take the "other file" as input? I guess am missing something Smilie
# 4  
Old 08-04-2010
Error Re:

Format may be considered as below...

00:00-34
00:01-23
...
...
...

...
...
23:59-65

But this is not the real problem I have... I have cited this only as an example.. My script must be able to give inputs to the program **dynamically**.

**Dynamically** is the only question I have, for if the inputs to be provided and their ordering is same irrespective of the number of invocations, and they are known at the time of writing the script, I can write this way..

sh <script_name>.sh << EOF
<input#1>
<input#2>
<input#3>
EOF
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Starting Applications With X

So, I wanted to see if I could just use X without a desktop. I installed Debian from a netinstall on a vm and installed xorg with apt. Logged in as a normal user with startx and had a big black background. Seemed like everything was working as expected, so I went to configure tint2 at start up. I... (3 Replies)
Discussion started by: Azrael
3 Replies

2. Shell Programming and Scripting

GUI Applications

Hi Experts, Can anyone suggest me kindly, whether designing some small GUI applications are possible in shell scripting..... Like a small calculator kind of stuff....... I fit is possible guide me with some examples. Thanks, Newbie....... (0 Replies)
Discussion started by: kritibalu
0 Replies

3. Linux

Portable Applications

Hello Im stuck with a project on converting existing applications in to their portable versions, What i mean is that i want an application to run on a Linux OS without the need of actually installing the application on that machine. My preffered OS is fedora as it is used on most machines in my... (1 Reply)
Discussion started by: engineeringme
1 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. UNIX for Advanced & Expert Users

Usernames across Applications

Hello everyone, I was just wondering if there was a way to make it so that usernames could be used across applications. For instance, I have a server that has a bunch of users. I want these users to have ways of accessing my database as well as a variety of other programs, but I don't want them... (2 Replies)
Discussion started by: gonzofish
2 Replies

6. Shell Programming and Scripting

transiest applications

i have to write a script that which would send mails For all the transient apps 1. How many apps are running 2. Since when is the app running plz help me in this............... plz help me, its urgent,................. plzzzzzzzzzzzzzzzzzzzzzzzzzzz (2 Replies)
Discussion started by: ali560045
2 Replies

7. UNIX for Advanced & Expert Users

Publishing X applications

Hi all, I have some UNIX servers (all flavor to be honest: SOLARIS, AIX, HP-UX) running some applications. I would like to publish these applications to remote client mainly running Windows XP. I know i can remotely access the desktop thanks to Cygwin,Hummingbird EXCEED... But I don't... (2 Replies)
Discussion started by: Platinium
2 Replies

8. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies

9. UNIX for Dummies Questions & Answers

X applications

I am an Oracle DBA who has previously worked only on NT machines. I need to install Oracle on an AIX box. This Unix server has only a CRT monitor. The Oracle installation REQUIRES a graphical means of seeing the Unix machine. I've been told that I should telnet from a PC that can display X... (2 Replies)
Discussion started by: jbrax
2 Replies
Login or Register to Ask a Question