Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Insert Text at tge beginning of found documents

    Help wanted · · · – – – · · ·
    2
    3
    43
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • digidax
      digidax last edited by

      Hi,
      I have here a document root of a webserver with around 1000 php files and > 4000 other files.
      Now I have to add in each php file at the beginning of the file a text line.

      So I would work with “search and replace in files”:
      Filter would be *.php
      Replace is: <?php require_once(“debugger.php”); ?>

      But I have nothing for what I can search for to replace it.
      How can I do the job?

      If not possible with notpad, I would write a bash script.

      Thanks, Frank

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @digidax last edited by

        @digidax

        I think the recent (from 2020) posts in this thread should get you going on your task: https://community.notepad-plus-plus.org/topic/11987/add-line-of-text-to-beginning-of-multiple-files

        digidax 1 Reply Last reply Reply Quote 1
        • digidax
          digidax @Alan Kilborn last edited by

          Thanks, have used not the right words for the search here but it solves my problem.

          1 Reply Last reply Reply Quote 2
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors