[San-Diego-pm] Unix shell errors

Chris Radcliff chris_radcliff at mac.com
Fri Feb 25 11:26:54 PST 2005


Hi Norm,

Just a guess, but you may want to check the likely scripts for 
line-ending problems.  If a script has the wrong end-of-line 
characters, the shell might not be able to parse the shebang line 
(#!/usr/bin/perl etc) to determine that it's a Perl script.  Thus the 
confused error message.

Cheers,
~chris

On Feb 25, 2005, at 9:55 AM, Norm Knupp wrote:

> I'm seeing a number of Unix shell syntax errors in my Apache error_log 
> file
> that I can't solve:
>
> sh: Syntax error at line 1 : `(' is not expected.
>
> This line occurs frequently throughout the error_log file, sometimes
> back-to-back, sometimes not. I'm running HP-UX 11.11 on an HP J210 work
> station (used as a web server).  Apache is v1.3.27 and Perl is 5.8.0.  
> I'm
> not running any pure shell scripts, but I do use the backquoted command
> syntax for some things, such as
>
> $now = `date +"%d-%b-%Y"`;
>
> I've tried to isolate the problem to one or more Perl programs by 
> comparing
> the time stamps surrounding the error to when the programs were run, 
> but so
> far I haven't found any that duplicates the error on my development 
> system,
> which has the same hardware and software as my production system.  My 
> web
> application is the most probable source for this since I haven't 
> updated
> HP-UX, Perl or Apache in several months and I updated my application 
> on 1
> January.  I had seen the syntax errors prior to that, but after the 
> 1st the
> occurrences increased dramatically.
>
> Any suggestions?



More information about the San-Diego-pm mailing list