The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
URL call from SHELL script chengwei Shell Programming and Scripting 33 1 Week Ago 06:21 AM
Call shell script from php not run ? raccsdl Shell Programming and Scripting 2 11-19-2007 04:21 AM
how can i call a shell script from pl/sql rajesh.P Shell Programming and Scripting 3 09-16-2007 08:09 PM
how can a call shell script from pl/sql rajesh.P UNIX for Dummies Questions & Answers 0 09-13-2007 11:42 PM
How to call a shell script from awk ? Amruta Pitkar Shell Programming and Scripting 1 04-20-2007 01:35 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: Jan 2008
Location: Bangalore
Posts: 17
shell script to call other files..plz help

Hi all,
I have a number of shell script,perl script.. etc in a directory,which i need to execute in some order.Now i need to create a script to call all these files in that order..so that the new script will execute all the files one by one....plz help this is urgent.


Thanks In advance

Anju

Last edited by anju; 02-04-2008 at 10:07 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-04-2008
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 758
Whatever scripts you want to run, write them in a file - the way you would execute them at command line

Write them in the order in which you want to execute them

Your file may look like:
Code:
#!/bin/sh
script_01.sh
script_02.sh
script_03.pl
and then run the file (its basically another shell script) that you have created
Reply With Quote
  #3 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: Aug 2007
Location: Bangalore
Posts: 285
Check out the permissions of the scripts,if they are not executable then change the permissions and run it as Yogesh suggested.
Reply With Quote
  #4 (permalink)  
Old 02-05-2008
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 758
Quote:
Originally Posted by namishtiwari View Post
Check out the permissions of the scripts,if they are not executable then change the permissions and run it as Yogesh suggested.
yes, and the first line in the scripts should begin with #! (something like #!/bin/bash or #!/usr/bin/perl - depending on the shell / language that you are using)
Reply With Quote
Google UNIX.COM
Reply

Tags
perl script, shell script

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:34 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0