RE: Change in behavior of bash / if [

2013-12-19 Thread Buchbinder, Barry (NIH/NIAID) [E]
To close the loop: I thought that before hitting "Send" with my response to Eric's latest email, I should check to see if the problem was still happening. I removed the quotes from around x$1 and ran it. The scripts now works as expected. So whatever it was, it was temporary and can no longer b

Re: Change in behavior of bash / if [

2013-12-18 Thread Eric Blake
On 12/18/2013 07:18 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote: >>> if [ "x$1" = xclip ] >> >> Yes, this is the correct fix for the improper quotation of the earlier >> example. > > But why would it need quoting unless the first argument unless the > command line is quoted and might have a space

RE: Change in behavior of bash / if [

2013-12-18 Thread Buchbinder, Barry (NIH/NIAID) [E]
Eric Blake sent the following at Tuesday, December 17, 2013 11:08 PM >On 12/17/2013 08:02 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote: >> Today, a script that I use every day stated giving me the following >> error message. (I grant that it might have started earlier and I >> didn't notice.) Note

Re: Change in behavior of bash / if [

2013-12-17 Thread Eric Blake
On 12/17/2013 08:02 PM, Buchbinder, Barry (NIH/NIAID) [E] wrote: > Today, a script that I use every day stated giving me the following > error message. (I grant that it might have started earlier and I > didn't notice.) Note that although it gave the error message, the > script seems to still hav