LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2015, 09:59 PM   #1
linux_nerd
LQ Newbie
 
Registered: Jun 2015
Posts: 26

Rep: Reputation: Disabled
How to find text that does not match


I need a way to find out if a string is different in a commands out put.
So say i run something like lspci grep for gigabit, I need to know if there is a card that does not contain gigabit. How would one accomplish this?
 
Old 07-23-2015, 10:03 PM   #2
Garyluvslinux
LQ Newbie
 
Registered: Jul 2015
Location: USA
Distribution: pclinuxos
Posts: 6

Rep: Reputation: Disabled
Code:
lspci | grep -v string
 
Old 07-23-2015, 10:13 PM   #3
Garyluvslinux
LQ Newbie
 
Registered: Jul 2015
Location: USA
Distribution: pclinuxos
Posts: 6

Rep: Reputation: Disabled
If you want to match all cases of gigabit, add the -i option, ignore case.

For example gigabit GigaBit GIGABIT, etc...

Last edited by Garyluvslinux; 07-23-2015 at 10:14 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sed match span text with style ted_chou12 Programming 3 03-11-2012 06:33 PM
[SOLVED] Modify the text between pattern match bnbhp0 Programming 4 02-29-2012 05:31 AM
match text over multiple lines Python donnied Programming 5 05-24-2009 09:18 AM
text match pipe to file then delete from original text file create new dir automatic tr1px Linux - Newbie 6 09-10-2008 09:40 PM
grep/sed/awk - find match, then match on next line gctaylor1 Programming 3 07-11-2007 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration