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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
diff between TAR+zip+FTP and TAR+FTP swarup2008 UNIX for Dummies Questions & Answers 1 07-02-2008 03:51 AM
diff tungaw2004 UNIX for Dummies Questions & Answers 3 04-25-2007 10:54 AM
Diff b/w $@ and $# PradeepRed Shell Programming and Scripting 4 01-24-2006 04:02 AM
diff 2 files; output diff's to 3rd file blt123 Shell Programming and Scripting 2 05-28-2002 11:29 AM
diff and ed? Brototype UNIX for Dummies Questions & Answers 2 10-29-2001 02:30 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 02-05-2009
ackbarr ackbarr is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 3
Simulate SVN diff using plain diff

Hi,

svn diff does not work very well with 2 local folders, so I am trying to do this diff using diff locally.

since there's a bunch of meta files in an svn directory, I want to do a diff that excludes everything EXCEPT *.java files. there seems to be only an --exclude option, so I'm not sure how to do this.

perhaps, we can use find and execute diff on each .java
or
we can do a grep after we get our result (filter to only .java diffs), but that'd be tricky.

this is what I have so far.
diff -r --exclude=.svn dir1/ dir2/ > diffs.txt

there are simply too many types of files to filter using only the --exclude option.

anyone have thoughts?
  #2 (permalink)  
Old 02-05-2009
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
how about:
Code:
       --exclude-from=file
              When  comparing  directories, ignore files and subdirectories whose
              basenames match any pattern contained in file.
  #3 (permalink)  
Old 02-05-2009
ackbarr ackbarr is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 3
Well, as I've said, there are simply too many files in there to try to exclude everything.

Unless, you are suggesting there is a way using an exclude file to instead INCLUDE only certain files?
  #4 (permalink)  
Old 02-07-2009
ackbarr ackbarr is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 3
Any help on this? All I want is a way to use diff with --include instead of --exclude...
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 12:05 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