Interactive scripts for Oracle


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Interactive scripts for Oracle
# 1  
Old 09-21-2010
Interactive scripts for Oracle

Hello friends,

I am a ORACLE user, we have some internal database file, lets say "demo.config" and an internal tool to patch this file....lets call that tool as "dbfixer".
We have 100's-1000's of such files "demo.config" which need to get patched by the tool. So we need to write a script ...
syntax is...

"dbfixer - c demo.config"

But this tool works in interactive mode....if I run this tool with a input file it asks me "do you really want to continue?" then I need to enter Y or N every-time it run...
So I am confused here how to script this provided that I always want ans "Y"?

So what I need is...a scipt/command where I can also specify this ans "Y" in shell/command itself.

Thanks,
Jenny

Moderator's Comments:
Mod Comment Title changed. Please use a descriptive subject text, per forum rules.
# 2  
Old 09-21-2010
Code:
echo "Y" > yes

for file in $(find . -name "*.config" )
do
  dbfixer - c $file < yes
done

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash -c interactive scripts

i have to run the following script through a pipe: script.sh: #!/bin/bash echo "Hello World" echo -e "The \033 here's how its currently being run: bash -c "$(cat script.sh)" This is an interactive script. the problem is, when i run it this way, if you go to another terminal and... (4 Replies)
Discussion started by: SkySmart
4 Replies

2. Shell Programming and Scripting

Identifying interactive scripts

so for the purposes of this thread, interactive scripts are shell scripts that prompts for a response from a user and then waits for the user to enter a response before proceeding. now, from my understanding of this, the one common string i can expect to find in all interactive scripts is some... (1 Reply)
Discussion started by: SkySmart
1 Replies

3. Shell Programming and Scripting

Bash interactive scripts

i have a script that contains: script.sh #!/bin/bash echo -e "\t\t\t0. Exit" echo -e "\t\t\t1. Help" echo -e "\t\t\t2. Notes" echo -e "\t\t\t3. Classes" echo "${newline}" echo -n -e "\t Please enter option number : " read Type case $Type in 1) clear ... (1 Reply)
Discussion started by: SkySmart
1 Replies

4. Shell Programming and Scripting

interactive scripts with user input that includes quotes

I'm writing a basic ldapsearch script that prompts the user for their search criteria. The input they're being asked for is the search filter portion of the ldapsearch command. This string must be quoted. When the script executes the command it returns nothing. If I hard code a search filter it... (1 Reply)
Discussion started by: donniemac
1 Replies

5. Shell Programming and Scripting

KSH - How to call different scripts from master scripts based on a column in an Oracle table

Dear Members, I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc. I would like to create a script which will will call other scripts based on the request action. Can we directly read from the REQUEST_ACTION... (2 Replies)
Discussion started by: Yoodit
2 Replies

6. Shell Programming and Scripting

oracle scripts

Env: AIX 5.3 I was doing shell scripting and for my Oracle DB. Now there is a requirement to use Perl instead of Shell Can anyone give the equivalent of this command in Perl `Sqlplus -S /nolog <<EOF conn / as sysdba $sql1 $sql2 ... ... ... EOF` I heard DBI should... (3 Replies)
Discussion started by: ilugopal
3 Replies

7. Homework & Coursework Questions

How to write script that behaves both in interactive and non interactive mode

Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines. It then prompts for deletion of the file. If user supplies arguments with the script , then it works on those files... (8 Replies)
Discussion started by: rits
8 Replies

8. Shell Programming and Scripting

ORACLE from Shell scripts

Hi, I have Oracle, and I want to execute simple queries in it. Is it possible to do this using a UNIX shell scripts. Are there any commands in Shell scripting where in I can communicate to ORACLE!? Thanks, (2 Replies)
Discussion started by: mohanprabu
2 Replies

9. Shell Programming and Scripting

Automating interactive scripts

Hi all, I am trying to write a program that will automate interactive scripts that use 'pkgadd'. Easily enough I can use 'pkgask' and a response file for most of what I want to do, but unfortunately there are parts of some pkg installations that are configured to only take input from /dev/tty!!... (2 Replies)
Discussion started by: bookoo
2 Replies
Login or Register to Ask a Question