Computing.Net > Forums > Unix > Please HELP in shell script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Please HELP in shell script

Reply to Message Icon

Name: tracy
Date: May 29, 2002 at 02:25:32 Pacific
Comment:

Hi,
I need to run a command and hit 4 times in response to the prompts after the command is run. I don't know how to do this in a shell script. Could someone please help me? Thank you very much.



Sponsored Link
Ads by Google

Response Number 1
Name: LANkrypt0
Date: May 29, 2002 at 06:50:54 Pacific
Reply:

eh? Your description of the problem at hand isnt very clear.
From what I gather, you need to run the script. Then hit something 4 times in response to some prompts after you run the script. (?)
Can you give specific examples? Be more clear? Because to be honest, I have no idea what you are talking about. =)


0

Response Number 2
Name: James Boothe
Date: May 29, 2002 at 09:30:59 Pacific
Reply:

I think Tracy wants to know how to run a command in a script and feed it answers.

mycommand << myendword
answer1
answer2
answer3
answer4
myendword

Any or all of the answers can be empty lines if you are wanting null responses, and I think that is what you are wanting.


0

Response Number 3
Name: tracy
Date: June 2, 2002 at 22:12:35 Pacific
Reply:

Hi All,
Thanks for your reply. James, i could not make mine work. I am wanting to feed in 4 to a command (export) as in the following example :-

I placed the "export .... full=y" line in a shell script. How do i feed in the responses?

export .... full=y
... y/n (y)
... y/n (y)
... y/n (y)
... y/n (y)

Please help. Thanks in advance.

Regards,
Tracy


0

Response Number 4
Name: tracy
Date: June 3, 2002 at 01:16:31 Pacific
Reply:

James,
It worked. Thanks so much for your help.

Best regards,
Tracy


0

Response Number 5
Name: frank
Date: June 21, 2002 at 03:34:08 Pacific
Reply:

Hi Tracy,

you can alos use "yes | YourScript "
you can use allways the "yes" command to produce "y"
Anyway, check your oracle export script.
You can prevent the confirmations by using the proper oracle parameter.

Regards Frank


No RISK no Fun


0

Related Posts

See More



Response Number 6
Name: Mazhar
Date: July 10, 2002 at 21:59:02 Pacific
Reply:

hello :)
I want some help about Shell & EggDrop
1: What Is Shell?
2: What Shell Provide?
3: What Is EggDrop?
4: How Can We Use EggDrop ?
5: How Can We Connect Shell?


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Please HELP in shell script

Please help with shell script www.computing.net/answers/unix/please-help-with-shell-script/4756.html

loops in shell scripts!!! www.computing.net/answers/unix/loops-in-shell-scripts/5140.html

Array size in shell script? www.computing.net/answers/unix/array-size-in-shell-script/5761.html