On Thu, May 30, 2013 at 4:42 AM, Linda Walsh <b...@tlinx.org> wrote: > > > Chet Ramey wrote: >> On 5/29/13 9:08 PM, Linda Walsh wrote: >>> Why would I get this: >>> >>>> echo "gtk-2.0/2.10.0/engines/liboxygen-gtk.so >>>> [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x]" >>> gtk-2.0/2.10.0/engines/liboxygen-gtk.so >>> [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x] >>> >>>> echo gtk-2.0/2.10.0/engines/liboxygen-gtk.so >>>> [u::rwx,u:law:rwx,g::r-x,m::rwx,o::r-x] >>> gtk-2.0/2.10.0/engines/liboxygen-gtk.so s >>> >>> ^^--so why doesn't it echo out it's input arguments? Where did the acl go? >>> into 's'? ;-/ >> >> Are you familiar with filename generation, commonly known as `globbing'? >> > > > Are you saying it took bracketed thing as a gorup of chars to match? > oh... and the r-x was a range that picked up a singled file 's'... ARG!... > oi oi oi... > > Thanks -- I was hoping it has some simple explanation that I just wasn't > seeing. > (I was only thinking of escape sequences...)... > > Cheers! > Linda > Missing quotes around [ ] can be nasty eg
#!/bin/bash shopt -s nullglob # sounds a good idea! ..... ..... i=0 while read a[i++]; do echo "${a[i]}" # why oh why nothing is printed! done <<< "hello"