I
I
Ivan Eliseev2017-03-15 12:37:10
linux
Ivan Eliseev, 2017-03-15 12:37:10

How to program a bash script to delete characters?

Hello!
In the head, the brake, I confess honestly.
It is necessary to do something, in general:
To wipe/replace characters in a certain document after executing the command.
As I understand it, this can be done through nano / vi, and in bash itself, just specify the order of the commands?
upd:
Sample text:
line1/qweqwe
line2/qweqwe
two lines
to remove
Sample result:
line1
line2

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2017-03-15
@BuriK666

sed s/lala/blabla/g -i filename
www.tldp.org/LDP/Bash-Beginners-Guide/html/Bash-Be...

S
Sergey Sokolov, 2017-03-15
@sergiks

sed will most likely help:
sed -i "s/Тостер/Хабрахабр/" diplom.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question