LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-21-2014, 10:07 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Need auto prompt (yes/no) in a script !


Dear Friends ,

I write a script to kill a oracle impdp job like below :
--
[oracle@rptsvr ~]$ cat kill_job.sh
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=PBLPRIM

impdp ultimus/ultimus_123 attach=SYS_IMPORT_FULL_02 << !
kill_job
--

After run the script it needs to manual entry , 'yes' or 'no' .

like :

Import> Are you sure you wish to stop this job ([yes]/no): UDI-00005: unexpected End-Of-File encountered
while reading input.

Now I want this script will be killed prompting 'yes' command automatically , not manually .

Hope My question is clear .

Please help me regarding this .
 
Old 01-22-2014, 03:00 AM   #2
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
yes command could be your solution

Code:
man yes
http://hscripts.com/tutorials/linux-commands/yes.html
 
  


Reply



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] apt-get auto prompt disappears after kernel upgrade wzyboy Linux - Software 1 05-09-2012 12:43 AM
script to prompt yes/no to user. jimmyjiang Red Hat 3 11-20-2011 07:43 PM
gdesklets auto start display file and without first screen prompt nvadekar Linux - Desktop 0 07-29-2009 10:54 PM
command runs at prompt not in script newbie_m Linux - Newbie 2 01-20-2005 02:12 PM
auto-completion - how does it work & can my script args auto-complete? BrianK Programming 1 06-11-2004 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration