This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C41113.A8524030
Content-Type: text/plain;
charset="iso-8859-1"
Having you tried using the "deltree" command rather than "del"? Removes a
directory and all its contents.
-M
-----Original Message-----
From: Mike Day [mailto:MDay AT qrs DOT com]
Sent: Saturday, March 20, 2004 10:15 PM
To: 'scott.kendall AT abbott DOT com'; ida3248b AT post.cybercity DOT dk
Cc: 'veritas-bu AT mailman.eng.auburn DOT edu'
Subject: RE: [Veritas-bu] Script Impaired
Thank-you very much ... yes, it is a Windows client that I need to do this
cleanup on after the job runs. The master/media server is an AIX box which
is why I'm interested in seeing some UNIX script examples for other tasks.
Mike
-----Original Message-----
From: scott.kendall AT abbott DOT com [mailto:scott.kendall AT abbott DOT com]
Sent: Saturday, March 20, 2004 7:03 PM
To: ida3248b AT post.cybercity DOT dk
Cc: Mike Day; 'veritas-bu AT mailman.eng.auburn DOT edu'
Subject: Re: [Veritas-bu] Script Impaired
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.
get rid of the 2nd % and you'll be ok.
if "%5" == "0" del r:\oracle\sapdev_dev
%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
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
To: "Mike Day" <MDay AT qrs DOT com>,
"'veritas-bu AT mailman.eng.auburn DOT edu'" <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_dev/*
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_notify.bat script but I'm script impaired
(joke, but true!). All I need to do is delete a folder full of Oracle dumps
when a backup is finished. What am I doing wrong here?
>
> if "%5%" == "0" del r:\oracle\sapdev_dev
>
> Also can anyone direct me to a web site that has some good AIX scripts I
can use? The one above is for a Windows client of course.
>
> Thanks,
> Hates Programming Mike
>
>
--
Cybercity Webhosting (http://www.cybercity.dk)
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
------_=_NextPart_001_01C41113.A8524030
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=411171520-23032004><FONT face=Arial color=#0000ff
size=2>Having
you tried using the "deltree" command rather than "del"? Removes a
directory and all its contents.</FONT></SPAN></DIV>
<DIV><SPAN class=411171520-23032004><FONT face=Arial color=#0000ff
size=2>-M</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Mike Day
[mailto:MDay AT qrs DOT com]<BR><B>Sent:</B> Saturday, March 20, 2004 10:15
PM<BR><B>To:</B> 'scott.kendall AT abbott DOT com';
ida3248b AT post.cybercity DOT dk<BR><B>Cc:</B>
'veritas-bu AT mailman.eng.auburn DOT edu'<BR><B>Subject:</B> RE:
[Veritas-bu] Script
Impaired<BR><BR></FONT></DIV>
<DIV><SPAN class=527091305-21032004><FONT face=Arial color=#0000ff
size=2>Thank-you very much ... yes, it is a Windows client that I need to do
this cleanup on after the job runs. The master/media server is an AIX
box which is why I'm interested in seeing some UNIX script examples for other
tasks. </FONT></SPAN></DIV>
<DIV><SPAN class=527091305-21032004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=527091305-21032004><FONT face=Arial color=#0000ff
size=2>Mike</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> scott.kendall AT abbott
DOT com
[mailto:scott.kendall AT abbott DOT com]<BR><B>Sent:</B> Saturday, March
20, 2004
7:03 PM<BR><B>To:</B> ida3248b AT post.cybercity DOT dk<BR><B>Cc:</B> Mike
Day;
'veritas-bu AT mailman.eng.auburn DOT edu'<BR><B>Subject:</B> Re:
[Veritas-bu]
Script Impaired<BR><BR></FONT></DIV><BR><FONT face=Arial size=2>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 face=Arial size=2>get rid of the 2nd % and you'll
be ok.</FONT> <BR><BR><FONT face="Courier New" size=2>if "%5" == "0"
del r:\oracle\sapdev_dev</FONT> <BR><BR><FONT face=Arial size=2>%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.</FONT> <BR><BR><FONT face=Arial size=2>you might need to add
/q to the del command so it doesn't prompt you when doing the delete since
this is a folder</FONT> <BR><BR><BR><FONT face=Arial size=2>- Scott</FONT>
<BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<TD><FONT face=sans-serif
size=1><B>ida3248b AT post.cybercity DOT dk</B></FONT> <BR><FONT
face=sans-serif size=1>Sent by:
veritas-bu-admin AT mailman.eng.auburn DOT edu</FONT>
<P><FONT face=sans-serif size=1>03/20/2004 03:58 AM</FONT> <BR></P>
<TD><FONT face=Arial size=1>
</FONT><BR><FONT face=sans-serif size=1>
To: "Mike Day" <MDay AT qrs DOT
com>,
"'veritas-bu AT mailman.eng.auburn DOT edu'"
<veritas-bu AT mailman.eng.auburn DOT edu></FONT> <BR><FONT
face=sans-serif size=1> cc:
veritas-bu-admin AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT
face=sans-serif size=1> Subject:
Re: [Veritas-bu] Script
Impaired</FONT></TD></TR></TBODY></TABLE><BR><BR><BR><FONT
face="Courier New" size=2>Hello Mike<BR><BR>You could
do<BR><BR>#!/bin/ksh<BR><BR>if [ $5 -eq 0 ]; then<BR> rm
/oracle/sapdev_dev/*<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_notify.bat
script but I'm script impaired <BR>(joke, but true!). All I need to
do
is delete a folder full of Oracle dumps <BR>when a backup is
finished.
What am I doing wrong here?<BR><BR>><BR><BR> <BR><BR>> if "%5%"
== "0" del r:\oracle\sapdev_dev<BR><BR>><BR><BR> <BR><BR>>
Also can anyone direct me to a web site that has some good AIX scripts I
<BR>can use? The one above is for a Windows client of
course.<BR><BR>><BR><BR> <BR><BR>> Thanks,<BR><BR>> Hates
Programming
Mike<BR><BR>><BR><BR> <BR><BR>><BR><BR> <BR><BR>--<BR>Cybercity
Webhosting
(http://www.cybercity.dk)<BR><BR>_______________________________________________<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></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C41113.A8524030--
|