Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    dubbi su sed e pagine html

    Ciao a tutti, ho gia' trovato qualche 3d sull'uso di sed per modificare codice html all'interno di diversi files.

    Dato che anche a guardare la documentazione su internet non sono riuscito a capire bene come fare, potreste dirmi quale comando usare per cancellare dal codice html questi tag?

    <meta NAME="description" CONTENT="testo1testo1testo1testo1">
    <meta NAME="keywords" CONTENT="testo2testo2testo2testo2">


    ovviamente testo1testo1testo1testo1 e testo2testo2testo2testo2 cambiano da pagina a pagina...


    grazie mille in anticipo
    ratatuia

  2. #2
    Utente di HTML.it L'avatar di cacao74
    Registrato dal
    Jan 2005
    Messaggi
    2,570
    codice:
    cacao74@tweety:~/tmp$ cat cacao.html
    <html>
            <head>
                    <meta NAME="description" CONTENT="testo1testo1testo1testo1">
                    <meta NAME="keywords" CONTENT="testo2testo2testo2testo2">
                    <meta NAME="author" CONTENT="cacao74">
            </head>
            ...
    </html>
    
    cacao74@tweety:~/tmp$ cat cacao.html | sed -e "/<meta NAME=\"description\" CONTENT=\".*\">/d" cacao.html
    <html>
            <head>
                    <meta NAME="keywords" CONTENT="testo2testo2testo2testo2">
                    <meta NAME="author" CONTENT="cacao74">
            </head>
            ...
    </html>
    Per applicare le modifiche direttamente nel file (inline), rileggiti la pagina di manuale, o riguarda meglio qualche thread sul forum.

    ciao
    slack? smack!

  3. #3
    Originariamente inviato da cacao74
    codice:
    cacao74@tweety:~/tmp$ cat cacao.html
    <html>
            <head>
                    <meta NAME="description" CONTENT="testo1testo1testo1testo1">
                    <meta NAME="keywords" CONTENT="testo2testo2testo2testo2">
                    <meta NAME="author" CONTENT="cacao74">
            </head>
            ...
    </html>
    
    cacao74@tweety:~/tmp$ cat cacao.html | sed -e "/<meta NAME=\"description\" CONTENT=\".*\">/d" cacao.html
    <html>
            <head>
                    <meta NAME="keywords" CONTENT="testo2testo2testo2testo2">
                    <meta NAME="author" CONTENT="cacao74">
            </head>
            ...
    </html>
    Per applicare le modifiche direttamente nel file (inline), rileggiti la pagina di manuale, o riguarda meglio qualche thread sul forum.

    ciao

    grazie mille

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.