Re: Delete all after a pattern
Yes, something like this
$ sed -E 's/(.*config=).*/\1/'
but something I had already tried but not work...
On Saturday, 31-08-2019 at 13:58 Roberto C. Sánchez wrote:
> On Sat, Aug 31, 2019 at 01:49:20PM +0200, Computer Planet wrote:
> > Hi guys!
> > Is It possible, with "sed" erase all after a pattern?
> > I'm trying in all way but I can't...
> > I'd like to erase all after the pattern "config=" but only in the same line,
> > regardless of where it is located inside in a file.
> >
> > Can somebody help me please?
> > Thank in advance for reply.
> >
> > e.g.: after "config=" erase all until the end of the line
> >
>
> Something like this:
>
> sed -E 's/(.*config=).*/\1/'
>
> Regards,
>
> -Roberto
> --
> Roberto C. Sánchez
>
>
Reply to: