Linux / UNIX Tech Support Forum
This is a discussion on diff command to exclude files that match pattern within the Getting started tutorials forums, part of the Linux Getting Started category; file1: hello /a/b/c/d/file.log hello /a/b/c/d/file.log1 hello /a/b/c/d/1file.log hello /a/b/c/d/1file.log1 hello /a/b/c/d/file.tmp hello /a/c/d/file.tmp hello /a/c/g/file.tmp file2: hi /a/b/c/d/file.log hi /a/b/c/d/file.log1 ...
|
|||||||
| Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
file1:
hello /a/b/c/d/file.log hello /a/b/c/d/file.log1 hello /a/b/c/d/1file.log hello /a/b/c/d/1file.log1 hello /a/b/c/d/file.tmp hello /a/c/d/file.tmp hello /a/c/g/file.tmp file2: hi /a/b/c/d/file.log hi /a/b/c/d/file.log1 hi /a/b/c/d/1file.log hi /a/b/c/d/1file.log1 hi /a/b/c/d/file.tmp hi /a/c/d/file.tmp hello /a/c/g/file.tmp how do i use diff to exclude /a/b/c/d/*log* |
| Sponsored Links | ||
|
|
|
||||
|
Use -x option
Code:
diff -x 'pattern' file1 file2 diff -x '/a/b/c/d/*log*' file1 file2
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| match the columns of 2 files and merge common rows | piyali_biobase | Shell scripting | 1 | 31-03-2009 03:09 PM |
| How to match two fields | Prahlad | Shell scripting | 3 | 09-04-2008 12:58 PM |
| pattern search with numbers | mercuryshipz | Coding in General | 0 | 14-02-2008 11:16 PM |
| Search Pattern And Arrays | mercuryshipz | Coding in General | 1 | 11-02-2008 02:26 PM |
| How to find different type of words (pattern matching) in vi | sweta | Linux software | 2 | 07-06-2005 10:22 PM |