Re: The ‘read -r’ bashism.
Charles Plessy <plessy@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
Reply to: