On Sat, Aug 31, 2019 at 02:17:30PM +0200, Computer Planet wrote: > 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/' > >
1. It would be much easier to help you if you provided details, like an example of an actual input line you are trying to work with, actual patterns you tried that didn't work, and any applicable error messages. As it is I am just guessing based on the very little information you provided. 2. Please don't top post. It is considered poor etiquette on this and most other similar lists. Regards, -Roberto -- Roberto C. Sánchez