Script to delete a specific line within a group of files

Closed

Description

I need a very simple and quick Script (it could be a bash Script), to run under a Centos Linux Server, to do exactly:

1) It would read a text file, with the names of a series of Domains names, one per line, this way:

aambrosio

aanoseguros

abcmack

abrasivacorretoradeseguros

abscorretor

...

...

and so on.

2) For each of these Domains the Script would search a file in a path always like this:

/home/domainname/www/tabelas_de_saude/[url removed, login to view]

So, as in the example above, the files to be found would be:

/home/aambrosio/www/tabelas_de_saude/[url removed, login to view]

/home/aanoseguros/www/tabelas_de_saude/[url removed, login to view]

/home/abcmack/www/tabelas_de_saude/[url removed, login to view]

/home/abrasivacorretoradeseguros/www/tabelas_de_saude/[url removed, login to view]

/home/abscorretor/www/tabelas_de_saude/[url removed, login to view]

...

...

and so son.

3) When finding such a file, the Script would look for a line within, where it would find a string saying:

This line must be deleted from each of those files.

OBS: when rewriting those files, if possible, not to change their original ownership.

That's all.

Skills: Shell Script

See more: in this line, find on-line, shell bash, in linux shell script, example shell script, bash file, above the line, OBS, linux bash script, bash script, delete file shell script, linux server files, read file specific line, linux read text file, linux bash shell, script search domains, series script, deleted domains, bash search, search specific file, deleted files centos, linux simple shell, delete files disk specific date, deleted file centos, centos bash script

Project ID: #4118220

Awarded to:

kaloyan13

Bash coder and Linux(Fedora) user/admin.

$30 USD in 1 day
(5 Reviews)
2.5

8 freelancers are bidding on average $36 for this job

k1ng440

Full time freelance web developer with over 8 years of commercial experience.

$50 USD in 2 days
(2 Reviews)
3.0
sumitgarg44

Can do this

$50 USD in 0 days
(5 Reviews)
2.3
noeand

Hi, Linux Admin with experience in scripting various tasks - from the simplest one to complex automation systems. Please check your message box for more information on my experience.

$40 USD in 0 days
(0 Reviews)
0.0
ashalalfah

Very Familiar with shell scripting.

$30 USD in 1 day
(0 Reviews)
0.0
Nimesh01

hi please contact me..

$30 USD in 2 days
(0 Reviews)
0.0
NanoTitanium

Dear Sir, I have 3 years experiences in writing Linux Script (bash) to manage servers (CentOS/RHEL, SuSE). I can provide you the script right away with high quality. Thanks.

$30 USD in 1 day
(0 Reviews)
0.0
prashantsax3na

Very easy. Tell me when to start!

$30 USD in 1 day
(0 Reviews)
0.0