[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getting weird output out of 'echo' w/args
From: |
Pierre Gaston |
Subject: |
Re: getting weird output out of 'echo' w/args |
Date: |
Thu, 30 May 2013 08:53:48 +0300 |
On Thu, May 30, 2013 at 4:42 AM, Linda Walsh <bash@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"
- getting weird output out of 'echo' w/args, Linda Walsh, 2013/05/29
- Re: getting weird output out of 'echo' w/args, Chet Ramey, 2013/05/29
- Re: getting weird output out of 'echo' w/args, Linda Walsh, 2013/05/29
- Re: getting weird output out of 'echo' w/args,
Pierre Gaston <=
- Re: getting weird output out of 'echo' w/args, Davide Brini, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Chris Down, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Davide Brini, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Chris Down, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Davide Brini, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Pierre Gaston, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Linda Walsh, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Chris Down, 2013/05/30
- Re: getting weird output out of 'echo' w/args, Linda Walsh, 2013/05/30