[Veritas-bu] Script Impaired
2004-03-20 22:02:41
This is a multipart message in MIME format.
--=_alternative 0010EAD786256E5E_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Since he used .bat, and by looking at the command, I'm guessing this is=20
for Windows. I think he tried to throw us off with the AIX questions at=20
the end.
get rid of the 2nd % and you'll be ok.
if "%5" =3D=3D "0" =A0del r:\oracle\sapdev=5Fdev
%x% is used this way for variables (e.g. %TEMP%), but 5 is not a variable, =
it's an argument passed to the script. For arguments it's just a single % =
at the beginning.
you might need to add /q to the del command so it doesn't prompt you when=20
doing the delete since this is a folder
- Scott
ida3248b AT post.cybercity DOT dk
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
03/20/2004 03:58 AM
=20
To: "Mike Day" <MDay AT qrs DOT com>, "'veritas-bu AT mailman DOT
eng.auburn.=
edu'"=20
<veritas-bu AT mailman.eng.auburn DOT edu>
cc: veritas-bu-admin AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] Script Impaired
Hello Mike
You could do
#!/bin/ksh
if [ $5 -eq 0 ]; then
rm /oracle/sapdev=5Fdev/*
fi
Remember that on UNIX you don't use the bat extension
Regards
Michael
On Fri, 19 Mar 2004 15:32:04 -0800, Mike Day wrote
> I need to write a simple bpend=5Fnotify.bat script but I'm script impaire=
d=20
(joke, but true!).=A0 All I need to do is delete a folder full of Oracle=20
dumps=20
when a backup is finished.=A0 What am I doing wrong here?
>
=A0
> if "%5%" =3D=3D "0" =A0del r:\oracle\sapdev=5Fdev
>
=A0
> Also can anyone direct me to a web site that has some good AIX scripts I =
can use?=A0 The one above is for a Windows client of course.
>
=A0
> Thanks,
> Hates Programming Mike
>
=A0
>
=A0
--
Cybercity Webhosting (http://www.cybercity.dk)
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
--=_alternative 0010EAD786256E5E_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<br><font size=3D2 face=3D"Arial">Since he used .bat, and by looking at the=
command, I'm guessing this is for Windows. I think he tried to throw=
us off with the AIX questions at the end.</font>
<br>
<br><font size=3D2 face=3D"Arial">get rid of the 2nd % and you'll be ok.</f=
ont>
<br>
<br><font size=3D2 face=3D"Courier New">if "%5" =3D=3D "0&qu=
ot; =A0del r:\oracle\sapdev=5Fdev</font>
<br>
<br><font size=3D2 face=3D"Arial">%x% is used this way for variables (e.g. =
%TEMP%), but 5 is not a variable, it's an argument passed to the script. &n=
bsp;For arguments it's just a single % at the beginning.</font>
<br>
<br><font size=3D2 face=3D"Arial">you might need to add /q to the del comma=
nd so it doesn't prompt you when doing the delete since this is a folder</f=
ont>
<br>
<br>
<br><font size=3D2 face=3D"Arial">- Scott</font>
<br>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>ida3248b AT post.cybercity DOT
dk</b></f=
ont>
<br><font size=3D1 face=3D"sans-serif">Sent by: veritas-bu-admin AT mailman DOT
en=
g.auburn.edu</font>
<p><font size=3D1 face=3D"sans-serif">03/20/2004 03:58 AM</font>
<br>
<td><font size=3D1 face=3D"Arial"> </font>
<br><font size=3D1 face=3D"sans-serif"> To: &nbs=
p; "Mike Day" <MDay AT qrs DOT com>,
"'ve=
ritas-bu AT mailman.eng.auburn DOT edu'" <veritas-bu AT
mailman.eng.auburn DOT ed=
u></font>
<br><font size=3D1 face=3D"sans-serif"> cc: &nbs=
p; veritas-bu-admin AT mailman.eng.auburn DOT edu</font>
<br><font size=3D1 face=3D"sans-serif"> Subject:=
Re: [Veritas-bu] Script Impaired</font></table>
<br>
<br>
<br><font size=3D2 face=3D"Courier New">Hello Mike<br>
<br>
You could do<br>
<br>
#!/bin/ksh<br>
<br>
if [ $5 -eq 0 ]; then<br>
rm /oracle/sapdev=5Fdev/*<br>
fi<br>
<br>
Remember that on UNIX you don't use the bat extension<br>
<br>
Regards<br>
Michael<br>
<br>
On Fri, 19 Mar 2004 15:32:04 -0800, Mike Day wrote<br>
> I need to write a simple bpend=5Fnotify.bat script but I'm script impa=
ired <br>
(joke, but true!).=A0 All I need to do is delete a folder full of Oracle du=
mps <br>
when a backup is finished.=A0 What am I doing wrong here?<br>
<br>
><br>
<br>
=A0<br>
<br>
> if "%5%" =3D=3D "0" =A0del r:\oracle\sapdev=5Fdev<=
br>
<br>
><br>
<br>
=A0<br>
<br>
> Also can anyone direct me to a web site that has some good AIX scripts=
I <br>
can use?=A0 The one above is for a Windows client of course.<br>
<br>
><br>
<br>
=A0<br>
<br>
> Thanks,<br>
<br>
> Hates Programming Mike<br>
<br>
><br>
<br>
=A0<br>
<br>
><br>
<br>
=A0<br>
<br>
--<br>
Cybercity Webhosting (http://www.cybercity.dk)<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<br>
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu<br>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu<br>
</font>
<br>
<br>
--=_alternative 0010EAD786256E5E_=--
|
|
|