|
-
Feb 9th, 2010, 08:15 AM
#1
Thread Starter
PowerPoster
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.
-
Feb 9th, 2010, 09:59 AM
#2
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
-
Feb 9th, 2010, 03:47 PM
#3
Re: Where can I ask a Unix/grep question?
 Originally Posted by MMock
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
-
Feb 9th, 2010, 03:58 PM
#4
Thread Starter
PowerPoster
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.
-
Feb 9th, 2010, 04:24 PM
#5
Re: Where can I ask a Unix/grep question?
 Originally Posted by MMock
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 $i; done
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
-
Feb 9th, 2010, 05:49 PM
#6
Re: Where can I ask a Unix/grep question?
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Feb 10th, 2010, 01:11 AM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|