The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Search a list of lines in file into files sriram003 UNIX for Advanced & Expert Users 2 05-20-2008 07:23 AM
Counting files in a directory that match a pattern dsravan Shell Programming and Scripting 31 07-24-2006 11:12 AM
Search a string from list of input files sivakumarvenkat UNIX for Dummies Questions & Answers 2 03-08-2006 06:08 PM
search all files for a pattern ynaik002 UNIX for Dummies Questions & Answers 4 02-23-2006 03:51 PM
List files that do not match the search pattern olapxpert IP Networking 1 04-14-2005 02:37 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-14-2005
olapxpert olapxpert is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 5
Question List files that do not match the search pattern

I need to list the files that do not match the search pattern:

Example:
cat file1
This is how it should work

cat file2
This is why I like Unix

grep -option? Unix * (or some other command)
returns file1
  #2 (permalink)  
Old 04-14-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Please read our rules and note:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

I will close the duplicate thread.
  #3 (permalink)  
Old 04-14-2005
olapxpert olapxpert is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 5
Quote:
Originally Posted by Perderabo
Please read our rules and note:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

I will close the duplicate thread.
I by ,istake submitted the thread under wrong forum and had no idea how to change the forum without creating a new thread.
  #4 (permalink)  
Old 04-14-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
man grep

grep -vl Unix *
  #5 (permalink)  
Old 04-14-2005
olapxpert olapxpert is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 5
I have used this command but it doesn't work
  #6 (permalink)  
Old 04-14-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
can you elaborate on the "it doesn't work" part, pls?
  #7 (permalink)  
Old 04-14-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,119
Code:
grep -c Unix * | nawk -F: '!$NF {print $1}'
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0