V
V
Vitaly2016-11-02 19:11:04
linux
Vitaly, 2016-11-02 19:11:04

How to replace part of a line in a file with bash or shell?

All the best, how can this be implemented correctly?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vaut, 2016-11-02
@vaut

man sed, awk, perl without knowing the details it's hard to advise more.

E
elcanner, 2016-11-03
@elcanner

sed -i 's/http/https/g' file1
replaces http with https in file1
without -i changes are displayed but the original file is not changed.
well, in more detail how vaut man / google wrote correctly on sed / awk utilities

S
Sergey Evstifeev, 2016-11-04
@eserDEN

there is also a tr command "what" "on what"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question