perlquestion
Kevin_Raymer
I am supposed to be seeing a backup report yet I am getting all this screen noise.......<br>
<br>
Here is my code that I hacked..
<br>
<code>
#!/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 schedtype
@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 server.
@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\EnableExtensions
@REM -
@REM - It should be set to 0x1 or you may have problems running this script.
@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_server1_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%
~
</code>
<br>
Here is the screen noise...<br>
<br>
<code>
[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 this"
(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 this"
(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 parameters"
(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 "Software\"
Backslash found where operator expected at ./nb.pl line 17, near "Microsoft\"
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 "@setlocal 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 "delims=|""
(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 "tokens=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.
</code>
<br>
I have 22 years experience and have never seen anything like this! I am beginning to wonder if PERL even works!
<br>
<br>
KR
<p><small>
2007-02-19 Considered by [andye]: troll <br />
2007-02-28 Unconsidered by [Arunbear]: [id://409197|enough] keep (and edit) votes {Keep: 16, Edit: 2, Reap: 22}
</small></p>