Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Maintaining the file name in a piped find  (Read 7166 times)

0 Members and 1 Guest are viewing this topic.

Grimbear13

    Topic Starter


    Rookie

    Re: Maintaining the file name in a piped find
    « Reply #15 on: December 17, 2009, 02:21:24 PM »
    That's not breaking it because that works fine in the original one that I have.

    ghostdog74



      Specialist

      Thanked: 27
      Re: Maintaining the file name in a piped find
      « Reply #16 on: December 17, 2009, 05:13:48 PM »
      Alternative, using GNU awk.
      Code: [Select]
      @echo off
      for %%I in (*.sql) do (
              gawk "/GRANT/&&/user_group/{print FILENAME\":\", $0}" %%I > newfile.txt
      )