Questions tagged as 'sed'

4
answers

Delete text after ==

A requirements file pip contains all the packages installed in Python, so that the file can be used elsewhere and rebuild the original programming environment. A requirements file looks like this: alabaster==0.7.9 arrow==0.8.0 awesome-slu...
asked by 10.03.2017 / 20:26
4
answers

Remove virus in wordpress with SED in a vps with linux

I have a vps with more than 100 wordpress installations and they all have a script in their header or header.php var _0xfcc4=["\x66\x72\x6F\x6D\x43\x68\x61\x72\x43\x6F\x64\x65","\x47\x45\x54","\x6F\x70\x65\x6E","\x73\x65\x6E\x64","\x72\x65\x73...
asked by 28.09.2018 / 16:03
2
answers

How does this Sed command work? [closed]

I wanted to know how this command works letter by letter, I do not understand it. find <directorio> -type d | sed -e 's;[^/]*/;|____;g;s;____|; |;g' The part of find <directorio> -type d I understand it well, which would...
asked by 06.09.2018 / 14:48
4
answers

Thirst replacement with variables

I would need to replace a variable in a file and even though I tried it with sed I did not reach the goal. I set the stage. I have a config.xml file like the following: <widget id="com.example.hello" version="0.0.1">...
asked by 11.11.2016 / 12:17
0
answers

Search and filter URL in a flat file (Bash) [closed]

I need to do the following: A script that searches in a flat file urls, and if part of the urls coincide, I printed them on the screen or I saved them in another flat file. For example, if I have a flat file with the following content: www....
asked by 02.11.2018 / 02:47
1
answer

Query with sed bash script string

I have the following example: cat test.txt Showing the following:    juan maria juan maria juan maria maria juan maria juan maria juan   roberto roberto roberto roberto roberto roberto To separate 2 from 2 each chain I do it using...
asked by 10.11.2018 / 13:21
1
answer

How can I select the lines between two patterns?

   Question and answer based on my own question and answer in How to select lines between two patterns? I have a file like the following and I would like to print the lines that appear between the patterns PAT1 and PAT2 . 1...
asked by 14.03.2017 / 16:16