[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] [PATCH] Use bash for several contrib scripts

From: Mike Bianchi
Subject: Re: [Groff] [PATCH] Use bash for several contrib scripts
Date: Thu, 2 Jan 2014 20:47:11 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jan 02, 2014 at 04:07:20PM +0000, Roger Leigh wrote:
> On Thu, Jan 02, 2014 at 05:00:04PM +0100, Ingo Schwarze wrote:
> > Hi Mike,
> > 
> > Mike Bianchi <address@hidden> wrote:
> > 
> > > There is no man page for  sh(1) .
> > > There is no executable for /bin/sh .  On Debian ...
> > 
> > Sorry if that answer seems blunt, but it is not groff's
> > problem if the shell is broken in Debian.
> It isn't broken.  It's just a minimal POSIX shell.  It will work
> fine with any script, providing you aren't using any non-standard
> bash, ksh or zsh extensions.  There might possibly be some new
> POSIX shell standard features which it doesn't yet support, but
> I've yet to encounter any deficiencies should any exist.  If you
> were using such features, it would doubtless break any many other
> systems as well using older POSIX shells.

Please define what a non-standard extension shell is.

When troff and nroff were new, in the 1970s,  /bin/sh   came from a file
named  sh.c .

My point is that  #!/bin/sh  is the name of a shell command that is not
documented.  In fact it does not exist anymore.

More over, on Debian, the man page for the  dash(1)  shell that  /bin/sh  does
point to _admits_ that that document is incomplete and that the command is not
strictly POSIX compliant.

How is someone attempting to understand a  #!/bin/sh  script to know what the
writer intended if there is no documented way to interpret the syntax?

All my shells  start with  #!/bin/bash  or  #!/bin/ksh  (depending on how long
ago I wrote them -- some are decades old).  That way whoever reads them knows
what standard I was writing to.

I'm suggesting that all the groff scripts should point to the shell the writer
was using when they were written.

The shell is very unlikely to have been  /bin/sh .

 Mike Bianchi
 Foveal Systems

 973 822-2085


reply via email to

[Prev in Thread] Current Thread [Next in Thread]