LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 05: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, 09: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-27-2008, 11:13 PM   #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-27-2008, 11:15 PM   #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-27-2008, 11:17 PM   #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



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 12:30 AM
new scripts won't run new2me Linux - Newbie 4 06-09-2005 09:14 AM
How to run .sh scripts piggysmile Linux - Software 2 06-24-2004 06:18 AM
how do you run scripts toejam Linux - General 5 05-24-2004 08:24 AM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 09:34 AM

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

All times are GMT -5. The time now is 12:02 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
Open Source Consulting | Domain Registration