[TriLUG] Odd behavior on different hosts
James Olin Oden
james.oden at gmail.com
Wed Jul 16 16:00:29 EDT 2008
On Wed, Jul 16, 2008 at 3:29 PM, Shawn Taylor <shtaylor at gpi.com> wrote:
> Hey Folks,
>
> I have a strange problem I am experiencing with a shell script. I have a
> bunch of bash shell scripts that are purely function definitions. I then
> include these functions in my scripts as I need them using the following:
>
> source /path_to_function_script_file
>
> Now on most of the hosts in our environment this works fine.
>
> However, on one box in particular I get the following error:
>
> '/script.sh: /export/home/my_uid/scr/sh/lib/db.lib: line 14: syntax error
> near unexpected token `{
>
> If I cat /etc/release on both machines the results are identical.
> If I execute bash --version on both machines the results are identical.
>
> My question is, are there other factors that could be causing the
> inconsistent behavior??
Are you sure the script is exactly the same and has not became
corrupted? Also, what is actually at line 14 of script.sh; is there
any clue from that or some lines around it. Your getting what amounts
to a syntax error, in that parser was not expecting a {. This likely
means a previous subroutine didn't have () or it could be that a quote
did not get closed, and ate the "blah()".
Now none of that seems right since it works on a differing system, but
some reason the bash on this systems sees a syntax error.
...james
More information about the TriLUG
mailing list