• How do you "grep" in a string when you know how it starts and how it en

    From Ottavio Caruso@21:1/5 to All on Wed Apr 24 16:20:41 2024
    Sorry for the convoluted title, but let's say I am looking for all the occurrences of "keep on *ing" in a file, so that it catches:

    keep on running
    keep on doing
    keep on walking


    I tried:

    $ grep -i "keep on *ing" file

    and

    $ grep -i "keep on [a-zA-Z0-9_]ing" file

    but it obviously didn't work.

    Thanks

    --
    Ottavio Caruso

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Ottavio Caruso on Wed Apr 24 20:19:47 2024
    On 4/24/24 10:20, Ottavio Caruso wrote:
    Sorry for the convoluted title, but let's say I am looking for all the occurrences of "keep on *ing" in a file, so that it catches:

    grep -i "keep on " file | grep "ing"

    or

    egrep -i "keep on .*ing" file



    --
    Grant. . . .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Amessyroom to Grant Taylor on Thu Jul 11 23:25:43 2024
    Re: How do you "grep" in a string when you know how it starts and how i
    By: Grant Taylor to Ottavio Caruso on Wed Apr 24 2024 08:19 pm

    On 4/24/24 10:20, Ottavio Caruso wrote:
    Sorry for the convoluted title, but let's say I am looking for all the occurrences of "keep on *ing" in a file, so that it catches:

    grep -i "keep on " file | grep "ing"

    or

    egrep -i "keep on .*ing" file



    --
    Grant. . . .
    Glad to see there is some "shell" discussion in this group. Just started pulling this usenet group into my bbs; and seem to be a lot of SPAM before this.