Christopher Barry on 19 Sep 2016 22:02:48 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] bash 4.4 news


The new bash has some cool options

http://git.savannah.gnu.org/cgit/bash.git/diff/NEWS?id=a0c0a00fc419b7bc08202a79134fcd5bc0427071&utm_source=anzwix

after installing it, do
man bash
then search for this:
/\ \ \ +Parameter\ +transformation

neat new variable manipulators, like

testarray=(this is my array)
echo ${testarray[@]@Q}
'this' 'is' 'my' 'array'

or

echo "${testarray[@]@A}"
declare -a testarray=([0]="this" [1]="is" [2]="my" [3]="array")

or

testvar="this\tis\tmy\tvar"
echo "${testvar2@E}"
this    is      my      var
or, echo without quotes
this is my var


plus readarray now allows any delimiter with -d now.


-- 
Regards,
Christopher
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug