[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why fail , [[ $sep$*$sep == $sep--$sep ]]
From: |
alex xmb sw ratchev |
Subject: |
Re: why fail , [[ $sep$*$sep == $sep--$sep ]] |
Date: |
Sat, 17 Feb 2024 16:49:08 +0100 |
On Sat, Feb 17, 2024, 16:48 alex xmb sw ratchev <fxmbsw7@gmail.com> wrote:
>
>
> On Sat, Feb 17, 2024, 16:44 alex xmb sw ratchev <fxmbsw7@gmail.com> wrote:
>
>>
>>
>> On Sat, Feb 17, 2024, 16:37 alex xmb sw ratchev <fxmbsw7@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Sat, Feb 17, 2024, 16:14 Greg Wooledge <greg@wooledge.org> wrote:
>>>
>>>> On Sat, Feb 17, 2024 at 04:07:22PM +0100, alex xmb sw ratchev wrote:
>>>> > set aa bb cc -- dd ; f=$'\1' IFS=$f ; [[ $f$*$f == "$f--$f" ]] &&
>>>> echo ye
>>>> >
>>>> > it says no ye
>>>>
>>>> Why would you think $* and -- would be equivalent, when you've got 5
>>>> positional parameters?
>>>>
>>>
>>> i used the old logic , sep sep-item-list sep matching sep data sep
>>>
>>> the -- is for arg sep , cat1.. -- cat2 -- cat3 ( or cat1 cat2 cat3 )
>>> it was for testing possible coding ways
>>>
>>
>> small fix : bash script cat1.. -- cat2.. -- cat3..
>> or
>> bash script cat1 cat2 cat3 # without multi
>>
>> i mean for arg parsing
>> i wanna support -- style multi category args , and in the args possible
>> kinds
>> 1 input dir ( dir cause programs purpose )
>> 2 '<' or '<0' for nextarg is file list , one per \n one per \0
>>
>
> umm scripts filename is
> xmb.cpnewfilenames
>
> to have a all_files dir , a smaller_dir , and output_additions_dir , to cp
> the missing files to
> for file sync
> .. with the addition of multi type args and multi dirs instead just one
> .. :))
>
.. and in that script i wanna have a -- check
thats this code i pasted
..
>>
>> unicorn:~$ set aa bb cc -- dd
>>>> unicorn:~$ f=$'\1' IFS=$f
>>>> unicorn:~$ printf %s "$*" | hd
>>>> 00000000 61 61 01 62 62 01 63 63 01 2d 2d 01 64 64
>>>> |aa.bb.cc.--.dd|
>>>> 0000000e
>>>> unicorn:~$ printf %s "$f$*$f" | hd
>>>> 00000000 01 61 61 01 62 62 01 63 63 01 2d 2d 01 64 64 01
>>>> |.aa.bb.cc.--.dd.|
>>>> 00000010
>>>> unicorn:~$ printf %s "$f--$f" | hd
>>>> 00000000 01 2d 2d 01 |.--.|
>>>> 00000004
>>>>
>>>
>>> i think in ur example would been 012d2d01
>>> if 2d is -
>>>
>>>>
- why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Greg Wooledge, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]],
alex xmb sw ratchev <=
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/17
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], alex xmb sw ratchev, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Kerin Millar, 2024/02/18
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Chet Ramey, 2024/02/20
- Re: why fail , [[ $sep$*$sep == $sep--$sep ]], Lawrence Velázquez, 2024/02/18