Jonathan Adams wrote:
> On Tue, Aug 18, 2009 at 04:25:01PM +0200, Roland Mainz wrote:
> > Vladimir Kotal wrote:
> > > Roland Mainz wrote:
> > > > Can anyone review the patch in
> > > > http://cr.opensolaris.org/~gisburn/cr_6712500_nightly_use_ksh93_001/ ,
> > > > please ?
> > > >
> > > > The basic changes are:
> > > > - Switch the shell interpreter from ksh88 to ksh93
> > >
> > > I see there is no -p option used anymore with ksh93. Is this the default
> > > behavior in ksh93 ?
> >
> > The option isn't needed for Solaris 10's ksh88 either...
> 
> It's important, because it skips processing .profile.

~/.profile and /etc/profile is only for login shells (both interactive
and non-interactive) and not for scripts. IMO it's a bug if a shell in
script mode starts to source such profile scripts (and AFAIK neither
Solaris 10's /usr/bin/ksh nor ksh93 do that).

> > > On line 530 you're changing grep -v "^$" to grep -v "^\$". The double
> > > quotes are not necessary - what about using single quotes to avoid the
> > > escape ?
> >
> > The problem is that the parser of a shell may choke at the $" statement,
> > trying to treat the '"' character as a variable name or l10n string
> > literal. ksh93 -n <scriptname> warns about this ambigous '$'
> > situation...
> 
> Fine, but why not change it to grep -v '^$', and avoid the extra backslash?

Ok... I originally just added the backslash to get rid of the following
warning...
-- snip --
/opt/onbld/bin/nightly: warning: line 530: $ not preceeded by \
-- snip --
... instead of thinking about a better form... ;-/

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to