SED search word hugs of data and replace with blank
SED search word hugs of data and replace with blank
(OP)
Hi,
Anyone can help on how to search and change using sed.
My text file:
"A"|"ExtCla436975E"|"20170108"|"activate"
"B"|"ExtClaArQ75EK"|"20170109"|"activate"
"C"|"ExtClaQYT64NF"|"20170110"|"ExtClaIPE46RT"
"D"|"ExtClaPLS34YZ"|"20170111"|"activate"
...
Need out file:
"A"|""|"20170108"|"activate"
"B"|""|"20170109"|"activate"
"C"|""|"20170110"|""
"D"|""|"20170111"|"activate"
Thanks in advance.
Regards,
FPalero
Anyone can help on how to search and change using sed.
My text file:
"A"|"ExtCla436975E"|"20170108"|"activate"
"B"|"ExtClaArQ75EK"|"20170109"|"activate"
"C"|"ExtClaQYT64NF"|"20170110"|"ExtClaIPE46RT"
"D"|"ExtClaPLS34YZ"|"20170111"|"activate"
...
Need out file:
"A"|""|"20170108"|"activate"
"B"|""|"20170109"|"activate"
"C"|""|"20170110"|""
"D"|""|"20170111"|"activate"
Thanks in advance.
Regards,
FPalero
RE: SED search word hugs of data and replace with blank
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Never mind this jesus character, stars had to die for me to live.
RE: SED search word hugs of data and replace with blank
Good Day!
Hugs of data, meaning millions of records in text file.
Regards,
FPalero
RE: SED search word hugs of data and replace with blank
Huge [amounts] of data is what you mean then.
"Hugs" are something completely different and nothing related to data volume or quantity
And by the way :)
You can probably tell from my signature text, I am in no way affiliated with a possibly composite character from a well known work of fantasy fiction.
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Never mind this jesus character, stars had to die for me to live.
RE: SED search word hugs of data and replace with blank
CODE
$ echo '"C"|"ExtClaQYT64NF"|"20170110"|"ExtClaIPE46RT"' | sed 's/Ext[^|]*"/"/g' "C"|""|"20170110"|""
RE: SED search word hugs of data and replace with blank
CODE -->
RE: SED search word hugs of data and replace with blank
Working Great! many thanks for the help.
Hi Iggsterman,
Great awk working too. you guys make me happy solving my case. Thank you very much.
Regards,
FPalero