Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
How can i do that if a change DIV element in one file it changes automatically in all other html file

I have a area for recent post in my website. It is same on all webpages of my website and even on same location. I want something that if i change it in 1 file it automatically updates in all other html files. I am using github to host my website.

<div class="recent">
            <h3>Recent Post</h3>
            <div class="post1">
                <a href="sanandrease.html">
                    <img src="images/sanandrease.jpeg" id="img1">
                    <p class="text1">Grand Theft Auto : San Andrease | Free Download | Highly Compressed </p>
                </a>
            </div>
        
        <div class="post2">
                <a href="gta3.html">
                    <img src="images/gta3.jpeg" id="img2">
                    <p class="text3">Grand Theft Auto 3 | Free <br>Download | Highly Compressed </p>
                </a>
            </div>
        
            <div class="post3">
                <a href="gta4.html">
                    <img src="images/gta4.jpeg" id="img3">
                    <p class="text3">Grand Theft Auto 4 | Free <br>Download | Highly Compressed </p>
                </a>
            </div>
        </div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could use search and replace with Notepad++ where you specifiy the workspace (the folders where this could apply to).

Python (any os) For those using Python 3.5+ you can now use a glob recursively with the use of ** and the recursive flag.

Here's an example replacing hello with world for all .txt files:

for filepath in glob.iglob('./**/*.txt', recursive=True): with open(filepath) as file: s = file.read() s = s.replace('hello', 'world') with open(filepath, "w") as file: file.write(s)

In linux you could use this: rpl

For most quick uses, you may find the command rpl is much easier to remember.

Replace foo with bar on all .txt files: rpl -v foo bar '*.txt'

Simulate replacing the regex foo.* with bar in all .txt files recursively: rpl --dry-run 'foo.*' bar '**/*.txt'

You'll probably need to install it (apt-get install rpl or similar).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!