Re: How can I extract differences between 2 folders ?
Hi, I don't want to sound impolite, but I think it's important that you know the correct terminology: On Tue, 5 May 2009 10:33:19 +0300, Yavuz Maşlak yavuz.mas...@netiletisim.net wrote: I use freebsd7.1 I have two folders [...] In UNIX, there are no folders. These are called directories. To avoid misunderstandings, please name them correctly in the future. which contains some expressions in everyline as following; File A: See? You call them files correctly. Why don't you refer to them as sheets of paper as an analogy to folders? :-) -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How can I extract differences between 2 folders ?
First of all I suppose you're talking about 2 files, not folders. In which case the command you're using isn't looking so bad since it shows the differences between file a and file b: diff --suppress-common-lines -w -y a b abcde | xyasz But since you do not seem to be happy with the output - what should it look like? Armin On Tue 05 May 2009, Yavuz Maşlak wrote: I have two folders which contains some expressions in everyline as following; File A: abcde 12345 etc. File B: xyzas 12345 etc As above some strings are same and some strings are different. There are several differents between these two files. When I run diff command diff --suppress-common-lines -y -w file1 file2 fileresult like I couldn't result right. How can I extract differences between 2 folders ? Which command do I need to use ? -- Armin Pirkovitsch a.pi...@inode.at ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How can I extract differences between 2 folders ?
First I am sorry writing folders instead of files. as far as I see diff command compares differences line by line between 2 files That's to say, File a orange blue yellow File b yellow blue orange diff --suppress-common-lines -w -y a b orange blue blue orange as above you see, A and B files contains the same strings but their's lines are different I wish diff or another command not to display same values which are in different lines. First of all I suppose you're talking about 2 files, not folders. In which case the command you're using isn't looking so bad since it shows the differences between file a and file b: diff --suppress-common-lines -w -y a b abcde | xyasz But since you do not seem to be happy with the output - what should it look like? Armin On Tue 05 May 2009, Yavuz Maşlak wrote: I have two folders which contains some expressions in everyline as following; File A: abcde 12345 etc. File B: xyzas 12345 etc As above some strings are same and some strings are different. There are several differents between these two files. When I run diff command diff --suppress-common-lines -y -w file1 file2 fileresult like I couldn't result right. How can I extract differences between 2 folders ? Which command do I need to use ? -- Armin Pirkovitsch a.pi...@inode.at ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How can I extract differences between 2 folders ?
I could write something in perl, but don't know if anything exists or not. - Original Message - From: owner-freebsd-questi...@freebsd.org owner-freebsd-questi...@freebsd.org To: freebsd-questions@freebsd.org freebsd-questions@freebsd.org Sent: Tue May 05 13:35:22 2009 Subject: Re: How can I extract differences between 2 folders ? First I am sorry writing folders instead of files. as far as I see diff command compares differences line by line between 2 files That's to say, File a orange blue yellow File b yellow blue orange diff --suppress-common-lines -w -y a b orange blue blue orange as above you see, A and B files contains the same strings but their's lines are different I wish diff or another command not to display same values which are in different lines. First of all I suppose you're talking about 2 files, not folders. In which case the command you're using isn't looking so bad since it shows the differences between file a and file b: diff --suppress-common-lines -w -y a b abcde | xyasz But since you do not seem to be happy with the output - what should it look like? Armin On Tue 05 May 2009, Yavuz Maşlak wrote: I have two folders which contains some expressions in everyline as following; File A: abcde 12345 etc. File B: xyzas 12345 etc As above some strings are same and some strings are different. There are several differents between these two files. When I run diff command diff --suppress-common-lines -y -w file1 file2 fileresult like I couldn't result right. How can I extract differences between 2 folders ? Which command do I need to use ? -- Armin Pirkovitsch a.pi...@inode.at ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org font size=1 div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in' /div This email is intended to be reviewed by only the intended recipient and may contain information that is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any review, use, dissemination, disclosure or copying of this email and its attachments, if any, is strictly prohibited. If you have received this email in error, please immediately notify the sender by return email and delete this email from your system. /font ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How can I extract differences between 2 folders ?
On Tue, 5 May 2009 21:35:22 +0300, Yavuz Maşlak yavuz.mas...@netiletisim.net wrote: First I am sorry writing folders instead of files. Directories. FreeBSD has directories and files. Please try to use the correct terminology. I wish diff or another command not to display same values which are in different lines. You could first run the files through sort, then diff them. -- Polytropon From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How can I extract differences between 2 folders ?
Polytropon wrote: On Tue, 5 May 2009 21:35:22 +0300, Yavuz Maşlak yavuz.mas...@netiletisim.net wrote: I wish diff or another command not to display same values which are in different lines. You could first run the files through sort, then diff them. Rather than diff(1), perhaps comm(1) is a better choice. You still need to sort the input files though: % sort file1 file1.sorted % sort file2 file2.sorted % comm -3 file1.sorted file2.sorted This will print two columns of output. The first column consists of lines that are only in file1, and the second of lines that are only in file2. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature