[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed with Variable Substitution in the command
From: |
alex xmb sw ratchev |
Subject: |
Re: sed with Variable Substitution in the command |
Date: |
Fri, 27 Sep 2024 18:35:38 +0200 |
thank you folks for good moments ...
On Friday, September 27, 2024, Greg Wooledge <greg@wooledge.org> wrote:
> On Fri, Sep 27, 2024 at 13:35:04 +0200, alex xmb sw ratchev wrote:
> > huuuu , yeah fail test
> >
> > {13..1}
> > bash returns wrong 1 at end for $11
> > yes
> > uhhhhh ... how ' new ' or ' old ' is this
>
> It's *extremely* old.
>
> hobbit:~$ echo "$BASH_VERSION"
> 2.05b.0(1)-release
> hobbit:~$ set -- a b c d e f g h i j k l m n o
> hobbit:~$ echo "$11"
> a1
>
> It goes back to the original Bourne shell as far as I know.
>
> > but gawk says it got it right , $11 being 3
> >
> > a=( {13..1} ) ; gawk <<<${a[*]} ' { print $11 } '
> >
> > weird .. i might have suxxed that knowledge from long ago ...
> > hmm
>
> Yes, awk and shell syntax *look* similar in many cases where they actually
> have different behaviors. It's easy to get a bit confused when you're
> mixing languages.
>
>
- Re: sed with Variable Substitution in the command, (continued)
- Re: sed with Variable Substitution in the command, alex xmb sw ratchev, 2024/09/27
- Re: sed with Variable Substitution in the command, Andreas Kähäri, 2024/09/27
- Re: sed with Variable Substitution in the command, alex xmb sw ratchev, 2024/09/27
- Re: sed with Variable Substitution in the command, Andreas Kähäri, 2024/09/27
- Re: sed with Variable Substitution in the command, Greg Wooledge, 2024/09/27
- Re: sed with Variable Substitution in the command,
alex xmb sw ratchev <=
- Re: sed with Variable Substitution in the command, alex xmb sw ratchev, 2024/09/27