Subject: Re: ksh bug?
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 09/13/2006 21:26:31
On Wed, 13 Sep 2006, Jukka Salmi wrote:
> which shell is right?
>
> $ cat reldate
> echo "`cut -d\\\" -f2 reldate.h`"
>
> $ cat reldate.h
> const char *ReleaseDate = "2006-09-08";
>
> $ ksh reldate
> reldate: no closing quote
ksh is wrong. Anyway, I suggest that you use this instead:
echo "$(cut -d\" -f2 reldate.h)"
or this:
dquote='"'
echo "$(cut -d${dquote} -f2 reldate.h)"
--apb (Alan Barrett)