I am supposed to be seeing a backup report yet I am getting all this screen noise.......
Here is my code that I hacked..
#!/usr/bin/perl
bpstart_notify.loc1_server1_nt.bat
@REM this script is called by NetBackup when a backup is initiated
@REM this script:
@REM receives 4 parameters, clientname, classname, schedname and sc
+hedtype
@REM must be executable by a user with Administrator rights
@REM should exit with 0 upon successful completion
@REM
@REM If this script will not complete within a few seconds, you should
+ set
@REM the BPSTART_TIMEOUT in the NetBackup configuration gui on the ser
+ver.
@REM You should also be aware that the time taken by this script will
+delay
@REM the initiation of other client's backups.
@REM
@REM - This script only runs on NT 4.0 and succeeding versions of NT.
+ You must
@REM - have command extensions enabled. Check the following registry
+entry:
@REM - HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableEx
+tensions
@REM -
@REM - It should be set to 0x1 or you may have problems running this s
+cript.
@setlocal ENABLEEXTENSIONS
@set LISTPATHS="%~dp0\goodies\listpaths"
@for /F "delims=|" %%p in ('%LISTPATHS% /s NB_MAIL_SCRIPT') do @set NB
+_MAIL_SCRIPT="%%p"
@set OUTF="d:\srvapps\veritas\backupresults\bpstart_notify.loc1_server
+1_nt.txt"
@REM - Get date and time.
@REM
@for /F "tokens=1*" %%p in ('date /T') do @set DATE=%%p %%q
@for /F %%p in ('time /T') do @set DATE=%DATE% %%p
@REM
@echo "This is a start_notify script" > %OUTF%
@REM
@REM Unremark the following line and add you batch file, command file
+ etc.
net stop "nai epolicy orchestrator agent" >> %OUTF%
net stop "network associates mcshield" >> %OUTF%
net stop "network associates alert manager" >> %OUTF%
~
Here is the screen noise...
[root@houic-u-s00001 /]# ./nb.pl
Array found where operator expected at ./nb.pl line 4, at end of line
(Missing semicolon on previous line?)
syntax error at ./nb.pl line 4, near "bat
@REM "
Bareword found where operator expected at ./nb.pl line 4, near "@REM t
+his"
(Missing operator before this?)
Array found where operator expected at ./nb.pl line 5, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 5, near "@REM t
+his"
(Missing operator before this?)
Bareword found where operator expected at ./nb.pl line 6, near "@REM
+ receives"
(Missing operator before receives?)
Number found where operator expected at ./nb.pl line 6, near "receives
+ 4"
(Do you need to predeclare receives?)
Bareword found where operator expected at ./nb.pl line 6, near "4 para
+meters"
(Missing operator before parameters?)
Array found where operator expected at ./nb.pl line 7, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 7, near "@REM
+ must"
(Missing operator before must?)
Array found where operator expected at ./nb.pl line 8, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 8, near "@REM
+ should"
(Missing operator before should?)
Number found where operator expected at ./nb.pl line 8, near "with 0"
(Do you need to predeclare with?)
Bareword found where operator expected at ./nb.pl line 8, near "0 upon
+"
(Missing operator before upon?)
Array found where operator expected at ./nb.pl line 9, at end of line
(Missing semicolon on previous line?)
Array found where operator expected at ./nb.pl line 10, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 10, near "@REM
+If"
(Missing operator before If?)
Array found where operator expected at ./nb.pl line 11, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 11, near "@REM
+the"
(Missing operator before the?)
Bareword found where operator expected at ./nb.pl line 12, near "@REM
+You"
(Missing operator before You?)
Bareword found where operator expected at ./nb.pl line 12, near "time
+taken"
(Do you need to predeclare time?)
Bareword found where operator expected at ./nb.pl line 13, near "@REM
+the"
(Missing operator before the?)
Array found where operator expected at ./nb.pl line 15, at end of line
(Missing semicolon on previous line?)
Backslash found where operator expected at ./nb.pl line 17, near "HKEY
+_CURRENT_USER\"
Backslash found where operator expected at ./nb.pl line 17, near "Soft
+ware\"
Backslash found where operator expected at ./nb.pl line 17, near "Micr
+osoft\"
Array found where operator expected at ./nb.pl line 18, at end of line
(Missing semicolon on previous line?)
Number found where operator expected at ./nb.pl line 19, near "to 0x1"
(Do you need to predeclare to?)
Bareword found where operator expected at ./nb.pl line 20, near "@setl
+ocal ENABLEEXTENSIONS"
(Missing operator before ENABLEEXTENSIONS?)
Array found where operator expected at ./nb.pl line 21, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 21, near "@set
+LISTPATHS"
(Missing operator before LISTPATHS?)
Array found where operator expected at ./nb.pl line 22, at end of line
(Missing semicolon on previous line?)
String found where operator expected at ./nb.pl line 22, near "F "deli
+ms=|""
(Do you need to predeclare F?)
Bareword found where operator expected at ./nb.pl line 22, near "%p in
+"
(Missing operator before in?)
Bareword found where operator expected at ./nb.pl line 22, near "@set
+NB_MAIL_SCRIPT"
(Missing operator before NB_MAIL_SCRIPT?)
Array found where operator expected at ./nb.pl line 23, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 23, near "@set
+OUTF"
(Missing operator before OUTF?)
Array found where operator expected at ./nb.pl line 24, at end of line
(Missing semicolon on previous line?)
Array found where operator expected at ./nb.pl line 26, at end of line
(Missing semicolon on previous line?)
String found where operator expected at ./nb.pl line 26, near "F "toke
+ns=1*""
(Do you need to predeclare F?)
Bareword found where operator expected at ./nb.pl line 26, near "%p in
+"
(Missing operator before in?)
Bareword found where operator expected at ./nb.pl line 26, near "@set
+DATE"
(Missing operator before DATE?)
Bareword found where operator expected at ./nb.pl line 26, near "%%p"
(Missing operator before p?)
Operator or semicolon missing before %p at ./nb.pl line 26.
Ambiguous use of % resolved as operator % at ./nb.pl line 26.
Array found where operator expected at ./nb.pl line 27, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 27, near "%p in
+"
(Missing operator before in?)
Bareword found where operator expected at ./nb.pl line 27, near "@set
+DATE"
(Missing operator before DATE?)
Bareword found where operator expected at ./nb.pl line 27, near "%%p"
(Missing operator before p?)
Operator or semicolon missing before %p at ./nb.pl line 28.
Ambiguous use of % resolved as operator % at ./nb.pl line 28.
Array found where operator expected at ./nb.pl line 28, at end of line
(Missing semicolon on previous line?)
Array found where operator expected at ./nb.pl line 29, at end of line
(Missing semicolon on previous line?)
String found where operator expected at ./nb.pl line 29, near "@echo "
+This is a start_notify script""
(Missing operator before "This is a start_notify script"?)
Array found where operator expected at ./nb.pl line 31, at end of line
(Missing semicolon on previous line?)
Bareword found where operator expected at ./nb.pl line 31, near "@REM
+ Unremark"
(Missing operator before Unremark?)
Execution of ./nb.pl aborted due to compilation errors.
I have 22 years experience and have never seen anything like this! I am beginning to wonder if PERL even works!
KR
2007-02-19 Considered by andye: troll
2007-02-28 Unconsidered by Arunbear: enough keep (and edit) votes {Keep: 16, Edit: 2, Reap: 22}
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.