Veritas-bu

[Veritas-bu] Script Impaired

2004-03-20 22:02:41
Subject: [Veritas-bu] Script Impaired
From: scott.kendall AT abbott DOT com (scott.kendall AT abbott DOT com)
Date: Sat, 20 Mar 2004 21:02:41 -0600
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. &nbsp;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 &quot;%5&quot; =3D=3D &quot;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">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbs=
p; &nbsp; &nbsp; &nbsp;&quot;Mike Day&quot; &lt;MDay AT qrs DOT com&gt;, 
&quot;'ve=
ritas-bu AT mailman.eng.auburn DOT edu'&quot; &lt;veritas-bu AT 
mailman.eng.auburn DOT ed=
u&gt;</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbs=
p; &nbsp; &nbsp; &nbsp;veritas-bu-admin AT mailman.eng.auburn DOT edu</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:=
 &nbsp; &nbsp; &nbsp; &nbsp;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>
 &nbsp; 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>
&gt; 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>
&gt;<br>
<br>
=A0<br>
<br>
&gt; if &quot;%5%&quot; =3D=3D &quot;0&quot; =A0del r:\oracle\sapdev=5Fdev<=
br>
<br>
&gt;<br>
<br>
=A0<br>
<br>
&gt; 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>
&gt;<br>
<br>
=A0<br>
<br>
&gt; Thanks,<br>
<br>
&gt; Hates Programming Mike<br>
<br>
&gt;<br>
<br>
=A0<br>
<br>
&gt;<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 &nbsp;- &nbsp;Veritas-bu AT mailman.eng.auburn DOT edu<br>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu<br>
</font>
<br>
<br>
--=_alternative 0010EAD786256E5E_=--

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