• bash: append in place

    From Kenny McCormack@21:1/5 to All on Wed Nov 30 17:59:46 2022
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    --

    "If God wanted us to believe in him, he'd exist."

    (Linda Smith on "10 Funniest Londoners", TimeOut, 23rd June, 2005.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John-Paul Stewart@21:1/5 to Kenny McCormack on Wed Nov 30 15:13:21 2022
    On 11/30/22 12:59, Kenny McCormack wrote:
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    Instead of the $ that a regex would use to match the end of a string,
    use the shell wildcard * to match anything. Then use & in the
    replacement text to insert whatever matched that pattern:

    $ someCommand "${@/*/&\/*.c}"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Bacarisse@21:1/5 to Ben Bacarisse on Wed Nov 30 20:17:36 2022
    Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

    gazelle@shell.xmission.com (Kenny McCormack) writes:

    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    echo "${@/*/&\/*.c}"

    But there is also new syntax I've not seem before:

    echo "${@/%/\/*.c}"

    (/# and /% match at the beginning and the end so here we match nothing
    at the end)

    --
    Ben.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Bacarisse@21:1/5 to Kenny McCormack on Wed Nov 30 20:15:21 2022
    gazelle@shell.xmission.com (Kenny McCormack) writes:

    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    echo "${@/*/&\/*.c}"

    --
    Ben.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Weisgerber@21:1/5 to Kenny McCormack on Wed Nov 30 21:13:01 2022
    On 2022-11-30, Kenny McCormack <gazelle@shell.xmission.com> wrote:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    If the pattern starts with '%', it is matched at the end. That
    also works with an empty pattern:

    $ someCommand "${@/%//*.c}"

    I seem to remember that there is a way to do this, but I can't recall it
    ATM.

    I had no idea this was possible, until I checked the man page.

    --
    Christian "naddy" Weisgerber naddy@mips.inka.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Kenny McCormack on Wed Nov 30 23:59:28 2022
    On 30.11.2022 18:59, Kenny McCormack wrote:
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    You've already got an answer using ${var/%...} which can (obviously in
    bash and zsh, but not in ksh) be simply written as "${@/%/.c}"

    $ set -- foo bar bletch
    $ echo "${@/%/.c}"

    (the more complex syntax in the other post produces "foo\/*.c bar\/*.c bletch\/*.c" in my environment which is not what I'd expect)

    If you want to avoid using/overwriting the positional parameters you can
    also use that pattern with array variables

    $ arr=( foo bar bletch )
    $ printf "'%s'\n" "${arr[@]/%/.c}"


    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    Unless having a need for the arguments to be stored as $@, and the 'set'
    is just a part of the test sample you can use brace expansion (at least
    for constant file lists) like

    $ echo {foo,bar,bletch}.c


    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Janis Papanagnou on Thu Dec 1 00:03:59 2022
    On 30.11.2022 23:59, Janis Papanagnou wrote:

    $ arr=( foo bar bletch )
    $ printf "'%s'\n" "${arr[@]/%/.c}"

    $ arr=( foo bar bletch )
    $ echo "${arr[@]/%/.c}"

    Forgot to simplify that variant for the post (for clarity).

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to ben.usenet@bsb.me.uk on Thu Dec 1 08:58:16 2022
    In article <87h6ygb3j3.fsf@bsb.me.uk>,
    Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
    Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

    gazelle@shell.xmission.com (Kenny McCormack) writes:

    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it. >>>
    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    I seem to remember that there is a way to do this, but I can't recall it >>> ATM. Any ideas?

    echo "${@/*/&\/*.c}"

    But there is also new syntax I've not seem before:

    echo "${@/%/\/*.c}"

    (/# and /% match at the beginning and the end so here we match nothing
    at the end)

    Thanks. These both looks like useful suggestions. I haven't tested them
    yet, but it looks right.

    --
    A 70 year old man who watches 6 hours of TV a day, plays a lot of golf
    and seems to always be in Florida is a retiree, not a president.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From applemcg@21:1/5 to Kenny McCormack on Thu Dec 1 06:35:46 2022
    you are looking for shell brace expansion:

    https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html

    echo {foo,bar,bletch}.c

    pre, and post, nested, ... all work. good luck

    On Thursday, December 1, 2022 at 3:58:21 AM UTC-5, Kenny McCormack wrote:
    In article <87h6ygb...@bsb.me.uk>,
    Ben Bacarisse <ben.u...@bsb.me.uk> wrote:
    Ben Bacarisse <ben.u...@bsb.me.uk> writes:

    gaz...@shell.xmission.com (Kenny McCormack) writes:

    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it. >>>
    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each. >>
    I seem to remember that there is a way to do this, but I can't recall it >>> ATM. Any ideas?

    echo "${@/*/&\/*.c}"

    But there is also new syntax I've not seem before:

    echo "${@/%/\/*.c}"

    (/# and /% match at the beginning and the end so here we match nothing
    at the end)
    Thanks. These both looks like useful suggestions. I haven't tested them
    yet, but it looks right.

    --
    A 70 year old man who watches 6 hours of TV a day, plays a lot of golf
    and seems to always be in Florida is a retiree, not a president.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to marty.mcgowan@gmail.com on Thu Dec 1 14:43:14 2022
    In article <556afb46-f290-42d4-b159-d4ccff867de9n@googlegroups.com>,
    applemcg <marty.mcgowan@gmail.com> wrote:
    you are looking for shell brace expansion:

    No, I'm not.

    You might want to re-read the original post.

    --
    It's all Al Gore's fault...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From applemcg@21:1/5 to Kenny McCormack on Tue Dec 6 11:16:10 2022
    On Thursday, December 1, 2022 at 9:43:19 AM UTC-5, Kenny McCormack wrote:
    In article <556afb46-f290-42d4...@googlegroups.com>,
    applemcg <marty....@gmail.com> wrote:
    you are looking for shell brace expansion:
    No, I'm not.

    You might want to re-read the original post.

    --
    It's all Al Gore's fault...

    Why not this then, I missed the slash:

    lib.$ set {foo,bar,zot}/*.c
    lib.$ ea
    3 foo/*.c bar/*.c zot/*.c
    lib.$

    p.s. i somehow got hooked on "zot" as rounding out the trio.

    might i ask why shell brace expansion isn't a solution. i was moved by the OP:

    "I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas? "

    this is a suitable idea.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to marty.mcgowan@gmail.com on Wed Dec 7 02:17:59 2022
    In article <7a1a6b31-4202-4937-aad3-7da4dfb20e03n@googlegroups.com>,
    applemcg <marty.mcgowan@gmail.com> wrote:
    On Thursday, December 1, 2022 at 9:43:19 AM UTC-5, Kenny McCormack wrote:
    In article <556afb46-f290-42d4...@googlegroups.com>,
    applemcg <marty....@gmail.com> wrote:
    you are looking for shell brace expansion:
    No, I'm not.

    You might want to re-read the original post.
    ...
    Why not this then, I missed the slash:

    lib.$ set {foo,bar,zot}/*.c
    lib.$ ea
    3 foo/*.c bar/*.c zot/*.c
    lib.$

    p.s. i somehow got hooked on "zot" as rounding out the trio.

    might i ask why shell brace expansion isn't a solution.

    It is close, but doesn't quite work.

    The problem is that, in real life, the contents of $@ comes from the
    command line invocation of the script, not from "set --".

    So, you need a way to get from "$@" to {contents,of,that,variable}/"*.c".
    I've grappled with this problem before in other contexts - getting from a
    shell variable to brace expansion. It can be done, but it is messy.

    Also, although not made 100% clear in the OP, I need it to end with *.c,
    not with an expansion of all the C source files in the directory. Hence,
    you need to quote it as above.

    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/RoyDeLoon

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From castAway@21:1/5 to Janis Papanagnou on Wed Jan 18 00:31:08 2023
    On 30/11/2022 19:59, Janis Papanagnou wrote:
    On 30.11.2022 18:59, Kenny McCormack wrote:
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    You've already got an answer using ${var/%...} which can (obviously in
    bash and zsh, but not in ksh) be simply written as "${@/%/.c}"

    $ set -- foo bar bletch
    $ echo "${@/%/.c}"

    (the more complex syntax in the other post produces "foo\/*.c bar\/*.c bletch\/*.c" in my environment which is not what I'd expect)

    If you want to avoid using/overwriting the positional parameters you can
    also use that pattern with array variables

    $ arr=( foo bar bletch )
    $ printf "'%s'\n" "${arr[@]/%/.c}"


    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?

    Unless having a need for the arguments to be stored as $@, and the 'set'
    is just a part of the test sample you can use brace expansion (at least
    for constant file lists) like

    $ echo {foo,bar,bletch}.c


    Janis


    So what does Janis mean? Is that a nickname?

    Well, I wonder, Janis Joplin. Like a bi singer.+

    That would be too great to have a woman looking at our code

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From castAway@21:1/5 to Janis Papanagnou on Wed Jan 18 00:33:29 2023
    On 30/11/2022 20:03, Janis Papanagnou wrote:
    Janis Papanagnou


    just a nickname, i have seen on google search, they may deem Janis as woman perhaps not

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From castAway@21:1/5 to castAway on Wed Jan 18 00:37:26 2023
    On 18/01/2023 00:33, castAway wrote:
    On 30/11/2022 20:03, Janis Papanagnou wrote:
    Janis Papanagnou


    just a nickname, i have seen on google search, they may deem Janis as woman perhaps not



    as far as i know, he is is a boy

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to castAway on Wed Jan 18 06:34:53 2023
    On 18.01.2023 04:31, castAway wrote:
    On 30/11/2022 19:59, Janis Papanagnou wrote:

    Janis

    So what does Janis mean? Is that a nickname?

    It's a common forename you find in western Christian cultures that is
    very common in many countries in their own country specific forms.
    Mine stems from the Greek culture where the non-abbreviated spelling
    is Ioannis. In anglo-american cultures it's usually written as Yanis;
    see also the prominent Yanis Varoufakis (university professor in the
    USA, IIRC, and temporarily part of the Greek government during the
    financial crisis a decade ago).

    So, no, it's (in this case) not a nickname. I prefer posting by real
    name, while otherwise trying to keep my privacy intact - if (e.g.)
    you're using google to find pictures of me you get only pictures of
    other persons (even female ones) despite, I dare to say, that Janis
    Papanagnou is a quite unique name combination even world wide.


    Well, I wonder, Janis Joplin. Like a bi singer.+

    I always wondered whether that was a phonetic transcription of the
    name Janice or a normal female name in the USA. Besides Janis Joplin
    I've never seem that name given to a woman (but who am I to know).


    That would be too great to have a woman looking at our code

    I'm sorry to have to disappoint you here. :-)

    Myself I prefer to not distinguish personalities by gender; respect
    everyone as he or she deserves it.

    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to Janis Papanagnou on Wed Jan 18 11:58:55 2023
    On Wed, 18 Jan 2023 06:34:53 +0100
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 18.01.2023 04:31, castAway wrote:
    On 30/11/2022 19:59, Janis Papanagnou wrote:

    Janis

    So what does Janis mean? Is that a nickname?

    It's a common forename you find in western Christian cultures that is
    very common in many countries in their own country specific forms.

    Like John in English or Johannes in German.

    Mine stems from the Greek culture where the non-abbreviated spelling
    is Ioannis. In anglo-american cultures it's usually written as Yanis;

    Or Yianis or Yiannis. In German "J" is pronounced differently than in
    English so for a German speaking person the natural pronunciation of
    "Janis" is Yianis. I think in German "judo" is pronounced yioudo.

    see also the prominent Yanis Varoufakis (university professor in the
    USA, IIRC, and temporarily part of the Greek government during the
    financial crisis a decade ago).

    So, no, it's (in this case) not a nickname. I prefer posting by real
    name, while otherwise trying to keep my privacy intact - if (e.g.)

    [...]

    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    This is the case on all comp* groups I frequent. On the other hand , rec.arts.sf.written has quite a few.

    --
    "Ensign Crusher is in Sickbay receiving fellatio from his mother."
    "Oh no, not again," groans the Captain.
    "He is not a true warrior!" exclaims Worf.
    http://groups.google.co.uk/group/alt.wesley.crusher.die.die.die/msg/8cc93193b362302b

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Spiros Bousbouras on Wed Jan 18 16:13:49 2023
    On 18.01.2023 12:58, Spiros Bousbouras wrote:
    On Wed, 18 Jan 2023 06:34:53 +0100
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 18.01.2023 04:31, castAway wrote:
    On 30/11/2022 19:59, Janis Papanagnou wrote:

    Janis

    So what does Janis mean? Is that a nickname?

    It's a common forename you find in western Christian cultures that is
    very common in many countries in their own country specific forms.

    Like John in English or Johannes in German.

    Exactly. And there's also abbreviated derived name forms like "Hans"
    (in German). Also in other [Christian] countries it's typically a
    very very common name; e.g. Jean in France, Giovanni in Italy, Juan
    in Spanish, or Ivan in Russia, just to name a few prominent ones.
    The Wikipedia has a nice thorough list of yet more language forms: https://en.wikipedia.org/wiki/Johannes

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pyt T.@21:1/5 to Janis Papanagnou on Wed Jan 18 19:42:35 2023
    On Wed, 18 Jan 2023 06:34:53 +0100, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 18.01.2023 04:31, castAway wrote:
    ..
    Well, I wonder, Janis Joplin. Like a bi singer.+

    I always wondered whether that was a phonetic transcription of the
    name Janice or a normal female name in the USA. Besides Janis Joplin
    I've never seem that name given to a woman (but who am I to know).

    You might know the song "Run too fast fly too high" from Janis Ian. :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sophie Hamilton@21:1/5 to Janis Papanagnou on Thu Jan 19 12:20:29 2023
    On Wed, 18 Jan 2023 06:34:53 +0100
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    If it helps, I read this group sometimes. But I've never posted here...
    before now.

    We do exist!

    - Sophie.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Sophie Hamilton on Thu Jan 19 17:56:39 2023
    On 19.01.2023 13:20, Sophie Hamilton wrote:
    On Wed, 18 Jan 2023 06:34:53 +0100
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    If it helps, I read this group sometimes. But I've never posted here... before now.

    We do exist!

    Glad to hear! :-)

    Janis


    - Sophie.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jerry Peters@21:1/5 to Janis Papanagnou on Sun Jan 22 20:47:25 2023
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 18.01.2023 04:31, castAway wrote:
    On 30/11/2022 19:59, Janis Papanagnou wrote:

    Janis

    So what does Janis mean? Is that a nickname?

    It's a common forename you find in western Christian cultures that is
    very common in many countries in their own country specific forms.
    Mine stems from the Greek culture where the non-abbreviated spelling
    is Ioannis. In anglo-american cultures it's usually written as Yanis;
    see also the prominent Yanis Varoufakis (university professor in the
    USA, IIRC, and temporarily part of the Greek government during the
    financial crisis a decade ago).

    So, no, it's (in this case) not a nickname. I prefer posting by real
    name, while otherwise trying to keep my privacy intact - if (e.g.)
    you're using google to find pictures of me you get only pictures of
    other persons (even female ones) despite, I dare to say, that Janis Papanagnou is a quite unique name combination even world wide.


    Well, I wonder, Janis Joplin. Like a bi singer.+

    I always wondered whether that was a phonetic transcription of the
    name Janice or a normal female name in the USA. Besides Janis Joplin
    I've never seem that name given to a woman (but who am I to know).


    That would be too great to have a woman looking at our code

    I'm sorry to have to disappoint you here. :-)

    Myself I prefer to not distinguish personalities by gender; respect
    everyone as he or she deserves it.

    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    Janis

    I found this:

    What does Janis mean?

    Janis Pronunciation of Janis ? as a name for girls is a Hebrew name,
    and Janis means "God is gracious". Janis is an alternate spelling
    of Jane (Hebrew): originally a feminine respelling of John. Janis
    is also a variation of Janice (Hebrew).

    http://www.thinkbabynames.com/meaning/0/Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pH@21:1/5 to Jerry Peters on Mon Jan 23 02:20:53 2023
    On 2023-01-22, Jerry Peters <jerry@example.invalid> wrote:
    Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
    On 18.01.2023 04:31, castAway wrote:
    On 30/11/2022 19:59, Janis Papanagnou wrote:

    Janis

    So what does Janis mean? Is that a nickname?

    It's a common forename you find in western Christian cultures that is
    very common in many countries in their own country specific forms.
    Mine stems from the Greek culture where the non-abbreviated spelling
    is Ioannis. In anglo-american cultures it's usually written as Yanis;
    see also the prominent Yanis Varoufakis (university professor in the
    USA, IIRC, and temporarily part of the Greek government during the
    financial crisis a decade ago).

    So, no, it's (in this case) not a nickname. I prefer posting by real
    name, while otherwise trying to keep my privacy intact - if (e.g.)
    you're using google to find pictures of me you get only pictures of
    other persons (even female ones) despite, I dare to say, that Janis
    Papanagnou is a quite unique name combination even world wide.


    Well, I wonder, Janis Joplin. Like a bi singer.+

    I always wondered whether that was a phonetic transcription of the
    name Janice or a normal female name in the USA. Besides Janis Joplin
    I've never seem that name given to a woman (but who am I to know).


    That would be too great to have a woman looking at our code

    I'm sorry to have to disappoint you here. :-)

    Myself I prefer to not distinguish personalities by gender; respect
    everyone as he or she deserves it.

    (OTOH it's indeed strange that there's so few (or even no) female
    posters around here.)

    Janis

    I found this:

    What does Janis mean?

    Janis Pronunciation of Janis ? as a name for girls is a Hebrew name,
    and Janis means "God is gracious". Janis is an alternate spelling
    of Jane (Hebrew): originally a feminine respelling of John. Janis
    is also a variation of Janice (Hebrew).

    http://www.thinkbabynames.com/meaning/0/Janis

    And in Latvian Janis (there's a squiggle over the N, I think) is pronounced YAWN-iss and is the Latvian equivalent of "John".

    pH in Aptos whose mom was latvian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Weisgerber@21:1/5 to wNOSPAMp@gmail.org on Mon Jan 23 09:55:38 2023
    On 2023-01-23, pH <wNOSPAMp@gmail.org> wrote:

    http://www.thinkbabynames.com/meaning/0/Janis

    And in Latvian Janis (there's a squiggle over the N, I think) is pronounced YAWN-iss and is the Latvian equivalent of "John".

    There is no "squiggle over the N" in Latvian orthography.

    Go to Wikipedia, pick an article on one of the Biblical Johns, look
    at the corresponding article in Latvian (Latviešu), there it is.

    The diacritic in this case is a bar (macron) over the a: Jānis.

    --
    Christian "naddy" Weisgerber naddy@mips.inka.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kees Nuyt@21:1/5 to naddy@mips.inka.de on Tue Jan 24 23:42:52 2023
    On Mon, 23 Jan 2023 09:55:38 -0000 (UTC), Christian Weisgerber <naddy@mips.inka.de> wrote:

    The diacritic in this case is a bar (macron) over the a: J?nis.

    Which means it is a long 'a'. https://translate.google.com/?sl=lv&tl=en&text=J%C4%81nis&op=translate
    --
    no sig

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Cyrille Lefevre@21:1/5 to Kenny McCormack on Fri Oct 27 06:16:53 2023
    On 30/11/2022 at 18:59, Kenny McCormack wrote :
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?


    Hi,

    $ set -- cp dd
    $ echo ${@/%/\/*.c}
    cp/cp.c cp/utils.c dd/args.c dd/conv.c dd/conv_tab.c dd/dd.c dd/gen.c
    dd/misc.c dd/position.c
    $ echo "${@/%/\/*.c}"
    cp/*.c dd/*.c

    /% means replace from the end
    /# from the beginning

    Regards,

    Cyrille Lefevre.
    --
    mailto:Cyrille.Lefevre-news%nospam@laposte.net.invalid
    remove "%nospam" and ".invalid" to answer me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to Cyrille.Lefevre-news%nospam@laposte on Fri Oct 27 09:05:23 2023
    In article <653b39b4$0$7462$426a34cc@news.free.fr>,
    Cyrille Lefevre <Cyrille.Lefevre-news%nospam@laposte.net.invalid> wrote:
    On 30/11/2022 at 18:59, Kenny McCormack wrote :
    Note: not looking for workarounds, got plenty of my own.
    In particular, if you have to code a loop, that takes the fun out of it.

    Anyway, suppose I do:

    $ set -- foo bar bletch

    I want to pass these args to a subprogram with "/*.c" appended to each.

    So, I'd like for:

    $ someCommand "${@/$/\/*.c}"

    to work, but it does not. This is b/c the above bash syntax doesn't deal
    in reg exps; it is some other kind of pattern matcher.

    I seem to remember that there is a way to do this, but I can't recall it
    ATM. Any ideas?


    Hi,

    $ set -- cp dd
    $ echo ${@/%/\/*.c}
    cp/cp.c cp/utils.c dd/args.c dd/conv.c dd/conv_tab.c dd/dd.c dd/gen.c >dd/misc.c dd/position.c
    $ echo "${@/%/\/*.c}"
    cp/*.c dd/*.c

    /% means replace from the end
    /# from the beginning

    Yes! Thank you! This is Usenet working as it was intended. A rarity
    these days!

    And, indeed, I found this in "man bash":

    ${parameter/pattern/string}
    Pattern substitution. The pattern is expanded to produce a pat-
    tern just as in pathname expansion. Parameter is expanded and
    the longest match of pattern against its value is replaced with
    string. If pattern begins with /, all matches of pattern are
    replaced with string. Normally only the first match is
    replaced. If pattern begins with #, it must match at the begin-
    ning of the expanded value of parameter. If pattern begins with
    %, it must match at the end of the expanded value of parameter.
    If string is null, matches of pattern are deleted and the / fol-
    lowing pattern may be omitted. If parameter is @ or *, the sub-
    stitution operation is applied to each positional parameter in
    turn, and the expansion is the resultant list. If parameter is
    an array variable subscripted with @ or *, the substitution
    operation is applied to each member of the array in turn, and
    the expansion is the resultant list.

    The bit about % and # is there in the text. I just never noticed it before.

    --
    Life's big questions are big in the sense that they are momentous. However, contrary to
    appearances, they are not big in the sense of being unanswerable. It is only that the answers
    are generally unpalatable. There is no great mystery, but there is plenty of horror.
    (https://en.wikiquote.org/wiki/David_Benatar)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)