Advertisement

08.01.2005 at 08:10AM PDT, ID: 21511399
[x]
Attachment Details

Unix shell script to loop through file and run commands

Asked by m1l in Unix Operating Systems

Tags: loop, script, shell, unix, through

Hi,

I need to write a generic installation script.  So for example we would run a set of sql scripts, so there would be a file with all the scripts to run in and the installation script would then loop through the file and run these using SQL*Plus.  Another that is slightly more complex is to move files from the installation directory to other directories.  This would also have a file, which the script would loop through but this file would be more complex, with it including the file and the destination directory.  There are other things but if someone could give me an example for both of these, I can work the rest out myself.

I'd guess you'd use sed/awk but I could be wrong.

MikeStart Free Trial
[+][-]08.01.2005 at 10:35PM PDT, ID: 14576540

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.02.2005 at 01:40AM PDT, ID: 14577197

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.02.2005 at 01:46AM PDT, ID: 14577216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.02.2005 at 04:29AM PDT, ID: 14577914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.02.2005 at 05:28AM PDT, ID: 14578345

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.02.2005 at 06:28AM PDT, ID: 14578822

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Unix Operating Systems
Tags: loop, script, shell, unix, through
Sign Up Now!
Solution Provided By: vshailesh
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08.02.2005 at 06:42AM PDT, ID: 14578941

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32