shell script to call other files..plz help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting shell script to call other files..plz help
# 1  
Old 02-05-2008
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-05-2008 at 02:07 AM..
# 2  
Old 02-05-2008
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
# 3  
Old 02-05-2008
Check out the permissions of the scripts,if they are not executable then change the permissions and run it as Yogesh suggested.
# 4  
Old 02-05-2008
Quote:
Originally Posted by namishtiwari
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)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

error in shell script while returning values-- urgent issue plz help.

Hi, I have initailized a varaible EBID as typeset Long EBID=0 i am calculating value of EBID using certian formula as below: (( CURR_EBID= ($BANDINDEX << 27) | ($CURR_FREQ << 16) | ($CURR_CELLID << 4) | $CURR_SECTOR_VALUE )) return $CURR_EBID The output is as below: + (( CURR_EBID=... (6 Replies)
Discussion started by: kasanur
6 Replies

2. Red Hat

how to call a particular function from one shell another shell script

please help me in this script shell script :1 *********** >cat file1.sh #!/bin/bash echo "this is first file" function var() { a=10 b=11 } function var_1() { c=12 d=13 (2 Replies)
Discussion started by: ponmuthu
2 Replies

3. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

4. Shell Programming and Scripting

plz help normal doubt abt shell script

How to print a only files and not directories in a path. for exam :a user consists both files and directoris in his path. i have to write a script to display only files not dirctories. and only dirctories not files. Advance thanks to forum members.:) (5 Replies)
Discussion started by: sivaranga001
5 Replies

5. Shell Programming and Scripting

i'm new to shell can handle this script for me plz

Write a shell script named displayargs that prints FOUR lines. The first line tells the name that was used to invoke the script, the second line tells how many parameters there were, the third line tells what the last parameter was, and the fourth line tells what the first parameter was. For... (8 Replies)
Discussion started by: kedah160
8 Replies

6. Shell Programming and Scripting

Recursive call to find files and directories in Shell script from current path.

################################################################ Copy this script to your path from where you want to search for all the files and directories in subdirectories recursively. ################################################################# code starts here... (2 Replies)
Discussion started by: Ramit_Gupta
2 Replies

7. UNIX for Dummies Questions & Answers

Shell Script Help Plz

####################################################################### # #This script will perform the menu such as : list file, change catalog, #file check, # #This script was written in UNIX Shell Programming Language #... (3 Replies)
Discussion started by: shekhani
3 Replies

8. Shell Programming and Scripting

Plz correct my syntax of shell script

Dear all I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that. What I actually want from this shell script is that it will move all the files one by one to another server which can be... (2 Replies)
Discussion started by: girish.batra
2 Replies

9. Shell Programming and Scripting

plz help me by creating required shell script

Dear all I am new to shell script. And this is my first post to this site as well as this forum. I would like to tell this forum that I require shell script, which is regarding transfers of files from a specific directory in a server A to server B on a specific directory through sftp command.... (5 Replies)
Discussion started by: girish.batra
5 Replies

10. Shell Programming and Scripting

Shell script to find out 2 last modified files in a folder..PLZ HELP!!!!!!!!!

hi all, I need to find out the last 2 modified files in a folder.There is some way by which,we can check the timestamp and find out..??please help this is urgent. Thanks in Advance Anju (3 Replies)
Discussion started by: anju
3 Replies
Login or Register to Ask a Question