shell scripts for linux SLES 10


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting shell scripts for linux SLES 10
# 1  
Old 04-13-2010
Question shell scripts for linux SLES 10

Hi,

could someone help me to create the following scripts

Need to create couple of shell scripts on LINUX SLES 10

Using my id
---------------
First script – this script should contain su and should take input <process name>

1 -login using my id and then sudo to <admin id>

2 -cd $SWDIR/bin

3- ./swutil EXPORTLIB /<process name> -acelmprvx +s



Using admin id
------------------

Second script – this script should take input <process name> and <id>

1- Login using admin id

2 -$SWDIR/bin/swutil IMPORTLIB <process name> / -giimmrmuuuuoacn +d <id>


Third script – this script should take input <process name> and <variable name, example $TEST_VER > and <options, example –m All>

1- login using admin id

2 -cd $SWDIR/util

3- export TEST_VER=”./plist –P <process name> | grep MODEL | awk ‘{print $1}’”

4- cd ../bin

5- ./swutil PROC RELEASE <process name> $TEST_VER deployscript –m ALL

6- ./swutil PROC RELEASE <process name> $PAYINB_VER deployscript


Thanks,




Last edited by Scott; 04-14-2010 at 03:24 PM..
# 2  
Old 04-14-2010
i have two main questions.

how to put sudo in the script
how to take input while running the script
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux SuSE SLES 8 error..unable to issue shutdown command

the only way we can power off is if we actually press power button on server. Running on HP DL-G4. from root, when we issue command it just returns to root prompt. (1 Reply)
Discussion started by: amexboy
1 Replies

2. Shell Programming and Scripting

Can anybody change this into Linux shell scripts?

@echo off SET "p0=%~0" SET "p1=%~1" SET "p2=%~2" SET "p3=%~3" SET "p4=%~4" SET "p5=%~5" SET "p6=%~6" SET "p7=%~7" SET "p8=%~8" SET "p9=%~9" SHIFT SET "p10=%~9" SHIFT SET "p11=%~9" SET "zip_path=D:\OraOutput\interco\%p10%" echo Program... (5 Replies)
Discussion started by: monisha
5 Replies

3. SuSE

Linux SLES Gui Not coming up

I had sles 11 sp2 installed on my system some days back and it was running fine. Today after I restarted my system the gui is not coming up and system starts in command terminal. sax2 command returns error: sax: gui is missing, starting command line interface sax: no x-server... (4 Replies)
Discussion started by: rupeshkp728
4 Replies

4. Shell Programming and Scripting

Validation of linux scripts

Hi, I have a script which invokes another script inside. Is there any way I can validate the script for syntax errors as well as checking if the files mentioned in the commands exist without executing it? Below is an example Example. ======================= Script1 #ksh echo... (3 Replies)
Discussion started by: krish000
3 Replies

5. Shell Programming and Scripting

Shell scripts migration from HP-Unix 11 to Red Hat Linux

We are changing our OS from HP-Unix 11 to Linux Red Hat. We have few k- shell, c - shell and sql scripts which are currently running under HP-Unix 11. Will these scripts work on LINUX as it is? or we need to do any code changes?IS there anyone who have done this kind of migration before?Thanks for... (2 Replies)
Discussion started by: Phoenix2
2 Replies

6. SuSE

SLES 9 vs SLES 11 hard drive cache read timings are diffrent

Can anyone give me a little clue on why the hard drive cache read timings on sles 9 is better then sles 11? The same hardware was used in both test. I even deleted the ata_generic module from initrd. The speed difference is 10MB vs 5 MB Thanks (1 Reply)
Discussion started by: 3junior
1 Replies

7. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

8. SuSE

SLES - 10 -DFLT_MSGMAX - Message queues in /usr/src/linux/ipc/mqueue.c

Folks, Does anyone know the magic to balancing out the: DFLT_MSGMAX and the DFLT_MSGSIZEMAX values? Is there some magical formula... We have a home grown program that is choking we think because of these values (the 10 and the 8192 defaults) Thanks, thomas B. #define... (0 Replies)
Discussion started by: lacakid
0 Replies

9. AIX

Difference between writing Unix Shell script and AIX Shell Scripts

Hi, Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies

10. UNIX for Dummies Questions & Answers

Linux Scripts

I'm pretty new to the world of linux, so no flames please. I know there is a plethora of info out on the internet about writing scripts for linux, but few give actual examples. I need some help with learning the basics of writing some simple scripts to learn the difference between windows and... (1 Reply)
Discussion started by: Strm2k
1 Replies
Login or Register to Ask a Question