Re: The ‘read -r ’ bashism.

2009-06-12 Thread Charles Plessy
Le Tue, Jun 09, 2009 at 07:59:53PM -0700, Ben Pfaff a écrit :
 
 Perhaps the fix is as simple as changing
 read
 to
 read REPLY.

Dear Ben, thank you very much.

Indeed, in the script found by checkbashisms, there is:

echo To exit use Control C or press return to continue.
echo
echo --
read

which will fail if using dash as /bin/sh.

Have a nice week-end,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



The ‘read -r ’ bashism.

2009-06-09 Thread Charles Plessy
Dear all,

in the ‘checkbashisms’ bugs of a package I work on, there is the following:

  checkbashisms' output:
   possible bashism in
   ./usr/share/EMBOSS/jemboss/utils/install-jemboss-server.sh line 607 
   (should
   be read [-r] variable):
   read

I would like to forward this Upstream, but I have no clue of what the problem
is, and how important it is. I have read ‘https://wiki.ubuntu.com/DashAsBinSh’,
but found nothing there. Can somebody send me a pointer to some documentation?

Have a nice day,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: The ‘read -r’ bashism.

2009-06-09 Thread Ben Pfaff
Charles Plessy ple...@debian.org writes:

  checkbashisms' output:
   possible bashism in
   ./usr/share/EMBOSS/jemboss/utils/install-jemboss-server.sh line 607 
   (should
   be read [-r] variable):
   read

 I would like to forward this Upstream, but I have no clue of what the problem
 is, and how important it is. I have read 
 ‘https://wiki.ubuntu.com/DashAsBinSh’,
 but found nothing there. Can somebody send me a pointer to some documentation?

My guess (although I am not by any means authoritative on this)
is that this is just saying that writing read without supplying
an argument is a bashism.  In bash, read by itself reads a line
into a variable named REPLY, but the standard requires a variable
name to be supplied.

Perhaps the fix is as simple as changing
read
to
read REPLY.

You can read about bash's read command by typing help read at
a bash prompt.  You can read the POSIX standard for the read
command at
http://www.opengroup.org/onlinepubs/009695399/utilities/read.html
-- 
Ben Pfaff 
http://benpfaff.org


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org