![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to separate numbers and words from a file using shell scripts | kamakshi s | UNIX for Dummies Questions & Answers | 1 | 06-26-2008 09:02 AM |
| i want to combine two awk scripts which is having same loop and filelist | LAKSHMI NARAYAN | Shell Programming and Scripting | 6 | 06-19-2007 05:02 PM |
| Solaris login scripts | citrowske | SUN Solaris | 0 | 02-08-2007 04:11 PM |
| scripts no longer running (solaris 8) | smcadoo | UNIX for Advanced & Expert Users | 3 | 01-25-2006 01:02 PM |
| kill scripts under Solaris | 98_1LE | UNIX for Dummies Questions & Answers | 1 | 04-05-2002 05:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello experts,
I have separate scripts (KSH) each for Solaris and AIX to install core applications (e.g. BigBrother). I also have a script called Installer that gives a menu list to select a particular application to install from a bunch of applications. Now I am trying to combine separate scripts into a single one so that: 1) when I first run "Installer" script, it will find out whether it is a Solaris or an AIX box 2) run the solaris part of script if it is solaris box and AIX part if it is IBM box from the merged script. (something like jump to AIX script once the installer script finds IBM box or vice versa) please help me on this |
|
||||
|
Hello experts,
please help me on this. This is the scenario: I have applications like BigBrother,PowerKeeper/PowerBroker etc.. which I have to install during server build for both AIX and Solaris. I already have separate installation scripts for both OS for all applications. Now, I want to merge these separate script (e.g. bigbrotheraix.ksh and bigbrothersolaris.ksh into a single bigbrotherunix.ksh) From one of my script "installer.ksh", (menu to select the desired application from so many other applications). your above wrapper works fine to select either solaris or aix using 'uname'. I will put this wrapper at the top of installer.ksh script to select OS and print message:: print "you have selected $OS box to install your application. Please select from the menu below to install $OS compatable application" now when an item is selected from the menu,I should be able to go to the single script containing both solaris and AIX scripts (e.g. bigbrotherunix.ksh) and select solaris part of the script if that turns out to be a solaris box. thanks for your attention. Last edited by solaix14; 10-05-2008 at 12:29 PM.. Reason: no response.. |
|
||||
|
Something like this then.
Code:
# early on in the script
uname=$(uname)
# now whenever you need to branch
case $uname in
AIX) do aix stuff
do some more aix stuff;;
Solaris)
do solaris stuff;;
esac
|
|
||||
|
help using case-statement for Korn shell
Hello experts,
1) I have two scripts (one for Solaris and one for AIX), now I want to put these two scripts into a single one. 2) Now I want to run this script (combined) from another script to: a) select if it is a solaris box or AIX b) run the solaris part of script from the combined script if the box comes out to be solaris or vice versa using case-statement. thanks in advance. |
|
||||
|
era,
thanks for responding back. can you please help me with this one in particular: Code:
OStype='uname -s' case $OStype in SUN) commands;; AIX) commands;; esac will go to the AIX part of script once OStype=AIX and vice-versa. I have not changed any thing in the original script but appended AIX script at the bottom of Solaris script. ( I am not so much familiar with scripting,,your help will be really appreciated) thanks in advance. |
| Sponsored Links | ||
|
|