Results 1 to 7 of 7

Thread: Where can I ask a Unix/grep question?

  1. #1

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,566

    Where can I ask a Unix/grep question?

    I saw a forum for Linux, but not Unix. I have a question regarding grep. Please move me if necessary.

    The grep I am using is GNU utilities for Win32 and I am using it to search my legacy ASP files for CreateObject. Most of the ASP files I've converted to .NET, but some remain. We are moving from a hosting company to our own servers and I need to make sure all the 3rd-party software that my web application interfaces with will be available for the ASP pages.

    There are tons of CreateObject ADODB.Connection. I don't care about these. So can I pipe the output of grep into another grep and say exclude ADODB.Connection? I tried this,
    grep CreateObject *.asp | grep -L ADODB
    which returned
    grep: writing output: Invalid Argument

    Thanks for any help.
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  2. #2
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657

    Re: Where can I ask a Unix/grep question?

    I would post in the Linux Forum. The Grep command is in Linux too !
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  3. #3
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Where can I ask a Unix/grep question?

    Quote Originally Posted by MMock View Post
    I saw a forum for Linux, but not Unix. I have a question regarding grep. Please move me if necessary.

    The grep I am using is GNU utilities for Win32 and I am using it to search my legacy ASP files for CreateObject. Most of the ASP files I've converted to .NET, but some remain. We are moving from a hosting company to our own servers and I need to make sure all the 3rd-party software that my web application interfaces with will be available for the ASP pages.

    There are tons of CreateObject ADODB.Connection. I don't care about these. So can I pipe the output of grep into another grep and say exclude ADODB.Connection? I tried this,
    grep CreateObject *.asp | grep -L ADODB
    which returned
    grep: writing output: Invalid Argument

    Thanks for any help.
    I know very little about grep, but the grep on Unix does not accept an Upper case "L".
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  4. #4

    Thread Starter
    PowerPoster MMock's Avatar
    Join Date
    Apr 2007
    Location
    My Mustang GT
    Posts
    4,566

    Re: Where can I ask a Unix/grep question?

    It's not true UNIX grep. I got that switch from doing a "grep --help".
    There are 10 kinds of people in this world. Those who understand binary, and those who don't.

  5. #5
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Where can I ask a Unix/grep question?

    Quote Originally Posted by MMock View Post
    It's not true UNIX grep. I got that switch from doing a "grep --help".
    In Unix, I would do this
    PHP Code:
    for i in $(find ./ -type f grep sql$); do  grep -l CreateObject $idone 
    Logically in Windows, you would have to write a Windows Script to do this.

    Another option I can suggest is using Notepad++ to search through your files, if that's what you want to do. This is a freeware utility.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Where can I ask a Unix/grep question?

    Thread moved
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Where can I ask a Unix/grep question?

    In GNU grep, the -v parameter inverts the match...

    Code:
    grep "CreateObject" *.asp | grep -v "ADODB"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width