Howdie, here's an anomally I just discovered after a very annoying
debugging session...

My native bash (Ubuntu 17.04) is version 4.4.7(1)-release

# aa=" hello" ; md5sum <<< $aa
fc22c4f0ac67cb377dd50629601e4df0  -
# aa=" hello" ; md5sum <<< "$aa"
fc22c4f0ac67cb377dd50629601e4df0  -

bash on Ubuntu 16.04 has version 4.3.48(1)-release

# aa=" hello" ; md5sum <<< $aa
b1946ac92492d2347c6235b4d2611184  -
# aa=" hello" ; md5sum <<< "$aa"
fc22c4f0ac67cb377dd50629601e4df0  -

So as usual, please give strings explicit quotes, or it will bite you in the 
tush.

For the record, the way the older bash behaves may well be the "correct"
one (losing the space from the string while tokenizing), and the new one
is more sensible. but it certainly isn't fair to fix this in a minor
version and screw up people's scripts, eh? :)

-- 
Does the name Pavlov ring a bell?
Ira Abramov
http://ira.abramov.org/email/

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to