Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

189
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda