ADSM-L

Re: weird quotes in script problem ...

2006-06-29 04:10:51
Subject: Re: weird quotes in script problem ...
From: "Choudarapu, Ramakrishna (GTI)" <Ramakrishna_Choudarapu AT ML DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 29 Jun 2006 09:10:19 -0400
Arnaud,

Try this way:

run new test_server 1 '/script/sap_inf_backup.sh ""PFR PAC PLC"" 1'

But, your script should be only the first three lines. i.e,

def scr test_1
upd scr test_1 'issue message i "variable 1: $1"' line=015
upd scr test_1 'issue message i "variable 2: $2"' line=010
upd scr test_1 'issue message i "variable 3: $3"' line=015

Regards,
Rama





-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
PAC Brion Arnaud
Sent: Thursday, June 29, 2006 8:33 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] weird quotes in script problem ...


Jeff,

Agree with you : my descrition of the problem was a little bit confusing
...

So, let's go for a second round :

1) This is TSM scripting, not AIX. 
2) What I'm trying to achieve is to escape quotes in a TSM script, so
that my statement, wich includes quotes, will be transmitted "as is",
and as 1 variable only to the next script.

Here an example :

Test_1 script looks like :

issue message i "variable 1: $1" 
issue message i "variable 2: $2" 
issue message i "variable 3: $3" 
issue message i "variable 4: $4" 
issue message i "variable 5: $5" 

If I issue: run test_1 test_server 1 "/script/sap_inf_backup.sh "PFR PAC
PLC" 1"
The output is :
ANR1496I variable 1: test_server
ANR1496I variable 2: 1
ANR1496I variable 3: /script/sap_inf_backup.sh  
ANR1496I variable 4: PFR
ANR1496I variable 5: PAC

What I would like to get :

ANR1496I variable 1: test_server
ANR1496I variable 2: 1
ANR1496I variable 3: /script/sap_inf_backup.sh "PFR PAC PLC" 1


Hope this made things clearer ;-)


Arnaud 

************************************************************************
******
Panalpina Management Ltd., Basle, Switzerland, 
CIT Department Viadukstrasse 42, P.O. Box 4002 Basel/CH
Phone:  +41 (61) 226 11 11, FAX: +41 (61) 226 17 01
Direct: +41 (61) 226 19 78
e-mail: arnaud.brion AT panalpina DOT com
************************************************************************
******

-----Original Message-----
From: Schaller, Jeff [mailto:Jeff.Schaller AT energyeast DOT com] 
Sent: Thursday, 29 June, 2006 14:01
To: PAC Brion Arnaud
Subject: RE: [ADSM-L] weird quotes in script problem ...

I'm getting a little lost in which script is doing what, so my next
suggestion would be to put a "set -x" statement near the top of all of
the involved scripts, and then execute them. That will show you the
values that are being passed around. You could also add in some "echo
$variable" statements in places to show you.

-jeff

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
PAC Brion Arnaud
Sent: Thursday, June 29, 2006 7:54 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] weird quotes in script problem ...

Vivian, Jeff

Thanks for your input : unfortunately it's not what I'm trying to do, my
problem is to pass all of : /usr/tivoli/tsm/script/sap_inf_backup.sh
"PFR PAC PLC" 1 string from script_1 to script_2 so that it would be
considered as 1 variable ($3).

I just realized that my original mail was wrong : I wrote
 
run script_1 test_server 1 '"/usr/tivoli/tsm/script/sap_inf_backup.sh
"PFR PAC PLC" 1"'

As it should have been :

run script_2 test_server 1 '"/usr/tivoli/tsm/script/sap_inf_backup.sh
"PFR PAC PLC" 1"'

Sorry for the mistake ....
Cheers.

Arnaud 

************************************************************************
******
Panalpina Management Ltd., Basle, Switzerland, CIT Department
Viadukstrasse 42, P.O. Box 4002 Basel/CH
Phone:  +41 (61) 226 11 11, FAX: +41 (61) 226 17 01
Direct: +41 (61) 226 19 78
e-mail: arnaud.brion AT panalpina DOT com
************************************************************************
******

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Vivian Leo Oliver
Sent: Thursday, 29 June, 2006 12:09
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: weird quotes in script problem ...

Hi,

DEFINE SCHEDULE AIX DBB_$1_$2 ACTION=COMMAND OBJECTS=\"$3\" PRIORITY=1

Cheers.
Vivian.

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU]On Behalf Of
PAC Brion Arnaud
Sent: Thursday, June 29, 2006 12:54 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] weird quotes in script problem ...


Hi List,
 
Trying to define a server command script, which basically will transmit
3 parameters (node_name, some other value, command to execute) to
another script, which in turn will build a client schedule using those
parameters..
 
Script_2  looks like :
 
DELETE SCHEDULE AIX DBB_$1_$2
DEFINE SCHEDULE AIX DBB_$1_$2 ACTION=COMMAND OBJECTS="$3" PRIORITY=1
PERUNITS=ONETIME DURATION=1 DURUNITS=DAYS DEFINE ASSOCIATION AIX
DBB_$1_$2 $1

My problem is following : how to place quotes in the script for $3 so
that I will execute following statement on the client :
/usr/tivoli/tsm/script/sap_inf_backup.sh "PFR PAF PLC"  1 
 
Already tried :
run script_1 test_server 1 '"/usr/tivoli/tsm/script/sap_inf_backup.sh
"PFR PAC PLC" 1"'
run script_1 test_server 1 "/usr/tivoli/tsm/script/sap_inf_backup.sh
'"'PFR PAC PLC'"' 1"
and other variants without success ...
 
Does anyone have a solution for this quoting quiz ?
Thanks in advance !
 
Cheers.
 
Arnaud



************************************************************************
******
Panalpina Management Ltd., Basle, Switzerland, CIT Department
Viadukstrasse 42, P.O. Box 4002 Basel/CH
Phone:  +41 (61) 226 11 11, FAX: +41 (61) 226 17 01
Direct: +41 (61) 226 19 78
e-mail: arnaud.brion AT panalpina DOT com
************************************************************************
******
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>