SED help



I would like to do the following SED replacement, but I am not having much
luck and thought I would ask for help.

TEXT1="some-text a.b.c.d a.b.c.d a.b.c.d a.b.c.d"
TEXT2="some-text 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4"

sed -i "s/$TEXT1/$TEXT2/g" $INFILE

;a.b.c.d are unknown IP Addresses.

----------------------

I have tried this:

TEXT2="some-text 1.1.1.1 2.2.2.2 3.3.3.3 4.4.4.4"
IP_REGEX="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][$
TEXT1="^some-text[ \t]${IP_REGEX}[ \t]${IP_REGEX}[ \t]${IP_REGEX}[
\t]${IP_REGEX}"

sed -i "s/$TEXT1/$TEXT2/g" $INFILE

----------------------

What I have does not work, and I need some assistance.

Your help is appreciated.

Thanks.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Reminders
    ... unknown way to successfully predict lottery numbers. ... If it is "unknown", then let it be. ... IF it is the winning ticket? ... Luck might come after damned near everything else, ...
    (rec.gambling.lottery)
  • NTBackup fails
    ... I am experiencing the exact problemyou are having;Error: The device reported an error on a request to write data to media. ... Unknown error.;have been for a month or two now. ... I have been looking for solutions all over the web and no luck. ...
    (microsoft.public.windows.server.general)
  • NTBackup failure(s)
    ... I am experiencing the exact problemyou are having;Error: The device reported an error on a request to write data to media. ... Unknown error.;have been for a month or two now. ... I have been looking for solutions all over the web and no luck. ...
    (microsoft.public.windows.server.general)
  • Re: Whew!
    ... > Good luck!!! ... Any idea how stiff the competition is? ... ;-) It really is the unknown factor in ...
    (alt.sewing)
  • Re: MediaCenter auto-login
    ... > it so that anyone putting anyname in using any password that is unknown ... Yeah, I knew about that, but, as posted on my first message... ... you need al my luck on that move! ...
    (Debian-User)