Veritas-bu

[Veritas-bu] Script Impaired

2004-03-21 00:15:13
Subject: [Veritas-bu] Script Impaired
From: MDay AT qrs DOT com (Mike Day)
Date: Sat, 20 Mar 2004 21:15:13 -0800
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_01C40F03.7D42C3A4
Content-Type: text/plain;
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit

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_01C40F03.7D42C3A4
Content-Type: text/html;
 charset=iso-8859-1
Content-Transfer-Encoding: 7bit

<!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 5.50.4937.800" name=GENERATOR></HEAD>
<BODY>
<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.&nbsp; The master/media server is an AIX box 
which is why I'm interested in seeing some UNIX script examples for other 
tasks.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=527091305-21032004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</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. &nbsp;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" &nbsp;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. &nbsp;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>&nbsp; &nbsp; &nbsp; &nbsp; </FONT><BR><FONT 
        face=sans-serif size=1>&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; 
        &nbsp; &nbsp;"Mike Day" &lt;MDay AT qrs DOT com&gt;, 
        "'veritas-bu AT mailman.eng.auburn DOT edu'" 
        &lt;veritas-bu AT mailman.eng.auburn DOT edu&gt;</FONT> <BR><FONT 
        face=sans-serif size=1>&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; 
        &nbsp; &nbsp;veritas-bu-admin AT mailman.eng.auburn DOT edu</FONT> 
<BR><FONT 
        face=sans-serif size=1>&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; 
        &nbsp; &nbsp; &nbsp;Re: [Veritas-bu] Script 
  Impaired</FONT></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>&nbsp; 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>&gt; I need to write a simple 
  bpend_notify.bat script but I'm script impaired <BR>(joke, but true!).&nbsp; 
  All I need to do is delete a folder full of Oracle dumps <BR>when a backup is 
  finished.&nbsp; What am I doing wrong 
  here?<BR><BR>&gt;<BR><BR>&nbsp;<BR><BR>&gt; if "%5%" == "0" &nbsp;del 
  r:\oracle\sapdev_dev<BR><BR>&gt;<BR><BR>&nbsp;<BR><BR>&gt; Also can anyone 
  direct me to a web site that has some good AIX scripts I <BR>can use?&nbsp; 
  The one above is for a Windows client of 
  course.<BR><BR>&gt;<BR><BR>&nbsp;<BR><BR>&gt; Thanks,<BR><BR>&gt; Hates 
  Programming 
  
Mike<BR><BR>&gt;<BR><BR>&nbsp;<BR><BR>&gt;<BR><BR>&nbsp;<BR><BR>--<BR>Cybercity 
  Webhosting 
  
(http://www.cybercity.dk)<BR><BR>_______________________________________________<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></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C40F03.7D42C3A4--


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