The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not Cpanel related...

Discussion in 'General Discussion' started by EMS, Aug 24, 2005.

  1. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Could a kind Linux guru possibly provide the following info ? I'd be very grateful.

    I need to add a simple comment to the <head> section of all .htm and .html files in the /home direcotry and subsequent user directories.

    Can this be done in one line ? Or would I need to write a script ?
     
  2. shashank

    shashank Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    159
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You will need a shell script for that. You need particular code placed in <head> </head> tags of all html and htm files in /home/*/public_html/* -R right ?
     
  3. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Yeah, thats basically it.

    Thought I could use a variation of this...

    cd /var/named; perl -pi.bak -e "s/14400/3600/g" *.db Which is used to change the ttl on zone files.

    I could change the file type to *.htm or *.html and the text "<head>" to "<head><-- my comments -->"
     
  4. EMS

    EMS BANNED

    Joined:
    May 10, 2003
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    Could anyone tell me if the above could be modified to do what I need ? Or could you offer me a script at a reasonable cost ? I'm sure its a very simple thing to do for many of you experts out there.
     
Loading...

Share This Page