Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2005 20:35:59 GMT
From:      Daniel Rudy <dr2867.business@pacbell.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/80868: /bin/sh gives wrong line number of unterminated quoted string error
Message-ID:  <200505102035.j4AKZxwU019348@www.freebsd.org>
Resent-Message-ID: <200505102040.j4AKe2Li013816@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         80868
>Category:       bin
>Synopsis:       /bin/sh gives wrong line number of unterminated quoted string error
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 10 20:40:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Rudy
>Release:        5.3-RELEASE-p6
>Organization:
>Environment:
FreeBSD wildfire.danielrudy.org 5.3-RELEASE-p6 FreeBSD 5.3-RELEASE-p6 #2: Wed Mar 30 06:30:41 PST 2005     root@strata:/usr/obj/usr/src/sys/WILDFIRE  i386
>Description:
When using borne shell scripts (/bin/sh) and there is a coding error in the script which results in a unterminated quoted string, /bin/sh gives the wrong line number of the error.
>How-To-Repeat:
Consider the following script:

unquote:
#!/bin/sh

echo "quote 1"
echo "quote 2
echo "quote 3"
echo "quote 4"

will yeild the following output:
./unquote: 6: Syntax error: Unterminated quoted string

It should be indicating that the error is on line 4, not line 6.  This causes a real hassle to find a unquoted terminated string if you have a large script with many strings.


>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505102035.j4AKZxwU019348>