Questions tagged as 'sed'

2
answers

Script string removal

To edit this file and remove all incidence of ^ [[* m how do I edit thirst? Incidents are marked in bold.    sed 's / \ ^ [[* m // g' file The backup routine is still running on the server! The backup process began at 15:19:28 EDT and i...
asked by 20.06.2017 / 00:43
3
answers

Add line at the end of the file with the command sed

I'm setting up a virtual machine to install JDK 7, Tomcat 7, JBoss EAP 7 and Postgresql. Follow the project on GitHub for those who are interested: cresol-enviroment-vagrant . I'm in the part where you need to add JAVA_HOME to the fil...
asked by 14.12.2016 / 19:20
1
answer

Sed - delete text from a position to the beginning of the file

I have this command that deletes from one position to the end of the file, but how do I delete this position to the beginning of the file? sed -i '/Enviar mailBlogThis/,$d' *.txt     
asked by 28.04.2018 / 04:42
1
answer

Editing file with links in shell script

I have a file with 130 links to make downloads via wget , all files are with links listed such as: http://minhateca.com.br/Animesdojonny/Desenhos/THUNDERCATS/Thundercats+-+Completo/Thundercats-EP001,743727846.rar http://minhateca.com.br/...
asked by 29.03.2018 / 01:06
1
answer

formatting command export sql with sed

I've exported a table from my database as follows: "1";"Boi Preto";"2000-02-29";"2";"Sol Nascente";"2009-10-01";"3";"Parque Belo";"2007-03-15";"4";"Pedras Bonitas";"2017-12-12";"5";"Medeiros";"2011-06-22"; and needed to leave as follows:...
asked by 25.01.2018 / 13:59
0
answers

SED in linux does not work

Good afternoon, I'm having trouble deleting a line in my crontab using sed. My line is this: 0 1 * * * root shutdown -r +1 My thirst that does not work: sed '/0 1 * * * root shutdown -r +1/g' /etc/crontab > /home/linaro/mycron I...
asked by 05.12.2018 / 17:10
0
answers

Write to a Shell Script file

I have a problem with writing a line in a file using Shell Script. I've tried to use sed and echo, but in both I do not have the expected behavior. Using sed: sed -i -e 'export LS_OPTIONS='--color=auto'' /root/.bashrc Using echo: echo...
asked by 26.11.2018 / 22:39
1
answer

Handle special characters

I am trying to return the CURL with SED, but as the information I get but sometimes has the character / causes an error in the SED syntax. TOKEN=$(curl --silent $URL | awk -F '"' '/content/ {print $2}') echo $TOKEN 2CTVaTm46Uoregv0VcU2QPd1...
asked by 05.04.2018 / 16:08
1
answer

Find and replace a line of text within a file with thirst

I have a problem with the regular expression, I have a file in ppd format that contains configurations of a printer installed in my sector, I need to change one line from one file to another with the command sed , the problem is grea...
asked by 16.01.2018 / 17:35
0
answers

Restricting the operation of some Android buttons

I've been trying for a few days, some alternatives to locking the buttons on a tablet, and then I need them to work again. I'll show you some ways I've done and which one is working the best possible way so far. This was the first attempt, ho...
asked by 20.10.2017 / 14:13