RFE: read -d STRING

2012-11-23 Thread Chris F.A. Johnson


   I would find it very useful to allow a string of delimiters to be
   used with 'read -d', with any member of the string terminating the
   input and the character used being stored in a variable, e.g.
   READ_DELIM.

--
   Chris F.A. Johnson, 
   Author:
   Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)



savestring() macro in general.h runs function arguments twice.

2012-11-23 Thread John E. Malmberg
The execute_cmd.c module uses make_command_string() as a parameter to 
the savestring() macro.


This causes the savestring() macro to call that function twice().

I have not done any timing tests to see how this is impacting 
performance, but it definitely shows up when stepping through commands 
doing debugging.


This issue was first noticed in bash 1.14.7 and is also seen in the 
current bash 4.2.39.


I have locally patched execute_cmd.c to use an intermediate variable. 
The proper fix should probably be in general.h.


I did not find any other cases where a function was passed as a parameter.

Bash 4.2.39 on VMS is now able to run its own configure script and also 
the curl 7.20 configure script which is a bigger torture.


EAGLE> bash --version
GNU bash, version 4.2.39(1)-release (alpha-dec-vms)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 



This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
GNV-3.0-1-JEM-1 Nov 23 2012 09:17:12

Regards,
-John
wb8tyw@qsl.network
Personal Opinion Only