P
P
Printip2017-11-22 19:06:03
linux
Printip, 2017-11-22 19:06:03

How to do find and replace from console?

Hello!
Source:

<span class="biger" style="direction: ltr; text-align: left">
This is the home page for the HelloWorld Web application.</span>
 Это домашняя страница веб-приложения HelloWorld.</span>

To be removed from the text:
<span class="biger" style="direction: ltr; text-align: left">
This is the home page for the HelloWorld Web application.</span>

Tried with sed but unfortunately sed only reads line by line((((

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sly_tom_cat ., 2017-11-23
@Sly_tom_cat

A bit hacky, but working:

cat test_file.txt | tr '\n' ' ' | sed 's/<span[^<]*<\/span>//'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question