LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-27-2008, 06:12 PM   #1
sharp859
LQ Newbie
 
Registered: May 2008
Posts: 28

Rep: Reputation: 0
Help to run many scripts from a master script


Hello all,

Could any one give me a hint to execute many shell scripts from a single master shell script..May be using shell switch case..please send me the notion of script...

Options
1]script1.sh
2]script2.sh
3]script3.sh
4]script4.sh and so an
5.Exit

I apprciate if u could give me a hint...I am a java developer...trying to learn shell scripting to automate stuffs.

Thanks,
Praveen M
 
Old 06-27-2008, 10:37 PM   #2
aTxIvG4001
LQ Newbie
 
Registered: Jun 2008
Location: Japan
Distribution: AMD64.Kubuntu
Posts: 18

Rep: Reputation: 0
Post

Quote:
Originally Posted by sharp859 View Post
Hello all,

Could any one give me a hint to execute many shell scripts from a single master shell script..May be using shell switch case..please send me the notion of script...

Options
1]script1.sh
2]script2.sh
3]script3.sh
4]script4.sh and so an
5.Exit

I apprciate if u could give me a hint...I am a java developer...trying to learn shell scripting to automate stuffs.

Thanks,
Praveen M
Hi

How about like this

test.sh
Code:
case "$1" in 
	ab)
		echo "ab"
		echo `sh ./ab.sh`
	cd)
		echo "cd"
	*) 
		echo "nothing"
esac
ab.sh
Code:
echo "ab in ab.sh"
regards,
Mark
 
Old 06-28-2008, 12:13 AM   #3
sharp859
LQ Newbie
 
Registered: May 2008
Posts: 28

Original Poster
Rep: Reputation: 0
Well,
I understood..I have the same idea...could you please clerealy write that example including soem echo statements like Please enter the choice? some thing like that..cus I have tried in many way..I stucked in a syntax error...so I am requesting...Mark..
 
Old 06-28-2008, 12:15 AM   #4
sharp859
LQ Newbie
 
Registered: May 2008
Posts: 28

Original Poster
Rep: Reputation: 0
my email id

Mark I am sending my email id will you able to ping me...

sharp859@gmail.com we wil discuss cleanely..what u say

Thanks,
 
Old 06-28-2008, 12:17 AM   #5
aTxIvG4001
LQ Newbie
 
Registered: Jun 2008
Location: Japan
Distribution: AMD64.Kubuntu
Posts: 18

Rep: Reputation: 0
Quote:
Originally Posted by sharp859 View Post
Well,
I understood..I have the same idea...could you please clerealy write that example including soem echo statements like Please enter the choice? some thing like that..cus I have tried in many way..I stucked in a syntax error...so I am requesting...Mark..
ah sorry, i forget to put ;;

Code:
case "$1" in 
	ab)
		echo "ab"
		echo `sh ./ab.sh`
		;;
	cd)
		echo "cd"
		;;
	*) 
		echo "nothing"
esac


Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Run-levels: Create, use, modify, and master LXer Syndicated Linux News 0 06-04-2008 01:30 AM
new scripts won't run new2me Linux - Newbie 4 06-09-2005 10:14 AM
How to run .sh scripts piggysmile Linux - Software 2 06-24-2004 07:18 AM
how do you run scripts toejam Linux - General 5 05-24-2004 09:24 AM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration