Pausing between two executions in a shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Pausing between two executions in a shell script
# 1  
Old 12-28-2010
Pausing between two executions in a shell script

HI,
Please help me on this. I have to execute 100 scripts which i have redirected in to a file . I want to pause the script after first execution and once i say enter key word it has to go to next execution. My looks like
Code:
for RUNFILES in `cat ${SOURCEFILES}/scripts`
do
  echo $RUNFILES;
  $sqlplus  /nolog <<!
  connect username/password@instance_name;
  spool $DESTDIR/${b}_$DATE.lst
  @RUNFILES 
  spool off
  exit;
done
!

Is there any way my script stops after executing first file and wait for my confirmation to execute second script. Please help

Last edited by Scott; 12-28-2010 at 01:24 PM.. Reason: Code tags, please...
# 2  
Old 12-28-2010
Add in read -pContinue: answer before the done.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Oracle/SQLPlus help - ksh Script calling .sql file not 'pausing' at ACCEPT, can't figure out why

Hi, I am trying to write a script that calls an Oracle SQL file who in turns call another SQL file. This same SQL file has to be run against the same database but using different username and password at each loop. The first SQL file is basically a connection test and it is supposed to sort... (2 Replies)
Discussion started by: newbie_01
2 Replies

2. Shell Programming and Scripting

Pausing a cron job

Hi All, I have a cronjob which runs a script every 5 mins. My problem is before the script is completed the cron job starts again after 5 mins. How can I put this second cron job to wait unless the first script has completed. Could you please help me on that (7 Replies)
Discussion started by: prats_7678
7 Replies

3. Shell Programming and Scripting

Run script every minute and terminate after specified number of executions

when it runs and look at my acron.log file it generates an error as below /tmp/prog.sh: line 4: (12 Replies)
Discussion started by: azherkn3
12 Replies

4. Shell Programming and Scripting

Read not prompting/ pausing for input

Heya people, So my script is one of those make-user-scripts, making a bunch of directories in the home folder and copying some files over into the new directories. However, part of the thing my script need to do is check the home folder if a username matches with a directory which already exists.... (6 Replies)
Discussion started by: Cloudy_Cat
6 Replies

5. UNIX for Advanced & Expert Users

How to increase executions speed of loops.?

(2 Replies)
Discussion started by: Venkatesh1
2 Replies

6. UNIX for Dummies Questions & Answers

Pausing and resuming process on laptop

Hi, I'm wondering if it's possible to pause a process I'm running in the background, close my laptop (I need to leave the office), and continue the process (when I get home). I've been running a process for a really long time and I don't want to have to start it over. Thanks in advance! (9 Replies)
Discussion started by: ShiGua
9 Replies

7. Shell Programming and Scripting

Pausing function with Perl

Hi all, I got the request to make a Perl script with the requirements as follow: 1. Make a program that just shows the time, a clock on the format 12:01:24. 2. When someone press key combination Ctrl -p the program should pause, ie the clock will stand still. When the Ctrl - p is pressed... (3 Replies)
Discussion started by: milo
3 Replies

8. Shell Programming and Scripting

Return Code of multiple inner executions

Need some clarification on two topics and I apologize for the long post. Topic 1). I have a PERL script which sends output to the console. This is executed like a daemon script. I would like to capture the "print" commands of the script to a log file. How can this be done. Topic 2) Within the... (9 Replies)
Discussion started by: jerardfjay
9 Replies

9. Shell Programming and Scripting

Pausing a Grep output

I am writing a small script which allows users to grep multiple log files across multiple directories, and often the output produced by the grep statements is quite lengthy. It would be nice if the output to the screen could be "paused" when it reaches a certain length (say, the length of the... (5 Replies)
Discussion started by: mharley
5 Replies

10. Shell Programming and Scripting

pausing a script

hello all, I have a script (Solaris v8 ksh) monitoring an inbound directory for reports. The script will then capture the report based on a set of circumstances. However I am unable to capture a report larger then 2-Gig in size due to program limitations. What I need to do is pause the monitor... (6 Replies)
Discussion started by: gozer13
6 Replies
Login or Register to Ask a Question