Previous in Forum: RDbMS   Next in Forum: Scanning JPEG ~ Word (or similar)
Close
Close
Close
15 comments
Rate Comments: Nested
Active Contributor

Join Date: Jul 2007
Posts: 11

comparing words

07/22/2007 11:57 PM

is there any software that can compare words which even though they are not arrange can still compare.now im using excel i have to arrange them in side by side column and assigned a formula to them to campare. i want to compare two files and tell me if they are match or not...

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Active Contributor

Join Date: Oct 2006
Location: San Diego, CA
Posts: 18
#1

Re: comparing words

07/24/2007 12:24 AM

jaycdc,

Can you elaborate on your question?

Thanks!

Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#2

Re: comparing words

07/24/2007 12:54 AM

Isn't there a command at the UNIX shell prompt that allows you to do this - "comp" or something like that. I think there's a command to do the same thing under Window's command prompt. Open a command prompt window, then type "help" and hit return. It will show you a list and explanation of all Windows commands that run at the prompt.

And if you import them into Word, I think Word can compare two files. One more, convert them into PDFs (if you have the software) any two PDFs can be compared and all the differences are flagged.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Power-User

Join Date: Apr 2007
Posts: 414
Good Answers: 19
#4
In reply to #2

Re: comparing words

07/24/2007 3:02 AM

That command is "diff". Here's the man page:

DIFF(1) User Commands DIFF(1)

NAME
diff - compare files line by line
SYNOPSIS
diff [OPTION]... FILES
DESCRIPTION
Compare files line by line.

-i --ignore-case
Ignore case differences in file contents.

--ignore-file-name-case
Ignore case when comparing file names.

--no-ignore-file-name-case
Consider case when comparing file names.

-E --ignore-tab-expansion
Ignore changes due to tab expansion.

-b --ignore-space-change
Ignore changes in the amount of white space.

-w --ignore-all-space
Ignore all white space.

-B --ignore-blank-lines
Ignore changes whose lines are all blank.

-I RE --ignore-matching-lines=RE
Ignore changes whose lines all match RE.

--strip-trailing-cr
Strip trailing carriage return on input.

-a --text
Treat all files as text.

-c -C NUM --context[=NUM]
Output NUM (default 3) lines of copied context.

-u -U NUM --unified[=NUM]
Output NUM (default 3) lines of unified context.

--label LABEL
Use LABEL instead of file name.

-p --show-c-function
Show which C function each change is in.

-F RE --show-function-line=RE
Show the most recent line matching RE.

-q --brief
Output only whether files differ.

-e --ed
Output an ed script.

--normal
Output a normal diff.

-n --rcs
Output an RCS format diff.

-y --side-by-side
Output in two columns.

-W NUM --width=NUM
Output at most NUM (default 130) print columns.

--left-column
Output only the left column of common lines.

--suppress-common-lines
Do not output common lines.

-D NAME --ifdef=NAME
Output merged file to show `#ifdef NAME' diffs.

--GTYPE-group-format=GFMT
Similar, but format GTYPE input groups with GFMT.

--line-format=LFMT
Similar, but format all input lines with LFMT.

--LTYPE-line-format=LFMT
Similar, but format LTYPE input lines with LFMT.

LTYPE is `old', `new', or `unchanged'.
GTYPE is LTYPE or `changed'.

GFMT may contain:

%< lines from FILE1

%> lines from FILE2

%= lines common to FILE1 and FILE2

%[-][WIDTH][.[PREC]]{doxX}LETTER
printf-style spec for LETTER

LETTERs are as follows for new group, lower case for old group:

F first line number

L last line number

N number of lines = L-F+1

E F-1

M L+1

LFMT may contain:

%L contents of line

%l contents of line, excluding any trailing newline

%[-][WIDTH][.[PREC]]{doxX}n
printf-style spec for input line number

Either GFMT or LFMT may contain:

%% %

%c'C' the single character C

%c'\OOO'
the character with octal code OOO

-l --paginate
Pass the output through `pr' to paginate it.

-t --expand-tabs
Expand tabs to spaces in output.

-T --initial-tab
Make tabs line up by prepending a tab.

-r --recursive
Recursively compare any subdirectories found.

-N --new-file
Treat absent files as empty.

--unidirectional-new-file
Treat absent first files as empty.

-s --report-identical-files
Report when two files are the same.

-x PAT --exclude=PAT
Exclude files that match PAT.

-X FILE --exclude-from=FILE
Exclude files that match any pattern in FILE.

-S FILE --starting-file=FILE
Start with FILE when comparing directories.

--from-file=FILE1
Compare FILE1 to all operands. FILE1 can be a directory.

--to-file=FILE2
Compare all operands to FILE2. FILE2 can be a directory.

--horizon-lines=NUM
Keep NUM lines of the common prefix and suffix.

-d --minimal
Try hard to find a smaller set of changes.

--speed-large-files
Assume large files and many scattered small changes.

-v --version
Output version info.

--help Output this help.

FILES are `FILE1 FILE2' or `DIR1 DIR2' or `DIR FILE...' or `FILE...
DIR'. If --from-file or --to-file is given, there are no restrictions
on FILES. If a FILE is `-', read standard input.

AUTHOR
Written by Paul Eggert, Mike Haertel, David Hayes, Richard Stallman,
and Len Tower.

REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>.

COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program under the terms of the GNU
General Public License. For more information about these matters, see
the file named COPYING.

SEE ALSO
The full documentation for diff is maintained as a Texinfo manual. If
the info and diff programs are properly installed at your site, the
command

info diff

should give you access to the complete manual.



diffutils 2.8.1 April 2002 DIFF(1)

Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#5
In reply to #4

Re: comparing words

07/24/2007 3:06 AM

OK... So tell him about it!

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 50
#8
In reply to #4

Re: comparing words

07/24/2007 11:40 PM

Yes! The "diff" command. Don't get much chance to use UNIX for quite some time.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Active Contributor

Join Date: Jul 2007
Posts: 11
#10
In reply to #4

Re: comparing words

07/25/2007 11:44 PM

whta software is this??is this a program or something pls broaden your explanation??thanks

Register to Reply
Commentator
Engineering Fields - Automotive Engineering - Auto+Motor=Sport

Join Date: Jun 2007
Location: Germany
Posts: 59
#3

Re: comparing words

07/24/2007 2:27 AM

I'll have to agree with Vermin on the Word for Windows: Copy part of the text into the "find" or "replace" window and search the other text. DOS does it too, if you have a simple .txt file at hand.

__________________
If you can't dig it, get a backhoe!
Register to Reply
Associate

Join Date: Jun 2007
Location: Dubai, U.A.E.
Posts: 25
#6

Re: comparing words

07/24/2007 8:41 AM

jay,

There are various ways available to compare files. But you have to let us know the exact media you are comparing (be it a string of words or formatted data, we don't know).

Register to Reply
Active Contributor

Join Date: Jul 2007
Posts: 11
#9
In reply to #6

Re: comparing words

07/25/2007 11:34 PM

ITS LIKE THIS,I HAVE TWO DATA FROM lets say excel.for example the data is (j12.17) i have to compare them with the other file if theres the same data but im talking here about 512 data so its ironic to find them one by one...

Register to Reply
Associate

Join Date: Jun 2007
Location: Dubai, U.A.E.
Posts: 25
#11
In reply to #9

Re: comparing words

07/26/2007 12:01 AM

I got what you mean...

You wanted to find a set of strings from a file containing strings, right?

With excel, using "Find" is not ideal because you will be repeating it for 512 times, right?

One way (maybe the best) is to formulate a macro, doing the "Find" task repetitively for all of let's say 512 strings. You could construct an array for the 512 strings you want to search from a file thru "referencing" (standard VBA tool) and then finding them one after another automatically. Some macro recording, if you know a little bit about visual basic, will be sufficient to do your task.

What do you intend to do once you find the string in the file?

Register to Reply
Active Contributor

Join Date: Jul 2007
Posts: 11
#12
In reply to #11

Re: comparing words

07/26/2007 12:12 AM

I WANT THEM TO FLAGGED down their corrresponding partners or i say same data.i dont know much of macro or either VB..can u help me doing some strings..

thanks

Register to Reply
Associate

Join Date: Jun 2007
Location: Dubai, U.A.E.
Posts: 25
#13
In reply to #12

Re: comparing words

07/26/2007 12:27 AM

What do you mean "flagged down"?

Will highlighting the found datum/data and making a list of the results found be sufficient?

Register to Reply
Active Contributor

Join Date: Jul 2007
Posts: 11
#14
In reply to #13

Re: comparing words

07/26/2007 1:23 AM

flagged down,anycomparison.for example, on the second data their corresponding equivalent or same text(word). 1-j50.12 on the second 20-j50.12.some what like this that i can evaluate its comparison

Register to Reply
Active Contributor

Join Date: Jul 2007
Posts: 11
#15
In reply to #13

Re: comparing words

07/26/2007 10:27 PM

is there any software or scripts that can compare words and flagged them out its corresponding equivalent..like i want to have a netlist,and i want to know the corresponding equivalent lets say in digital channel.ex(j50.12 in netlist i want to find also j50.12 in digital channel two separate excel.i am dealing here 512 and up of data. help me pls...

Register to Reply
Guru

Join Date: Feb 2006
Posts: 1758
Good Answers: 6
#7

Re: comparing words

07/24/2007 4:56 PM

The file below is a "StandAlone" & compares Folder/File.

See detail below

QVerify - Verify File Or Folder

http://www.edinaz.com/qverify.htmlHome <http://www.edinaz.com/index.html> Download <http://www.edinaz.com/qvfy10.zip>History <http://www.edinaz.com/qverify_hist.html>This purpose of this program is verify/compare data (Files, Folders, entire Disks). A single file may be compared with another single file. An entire disk or disk structure (folder with files and nested folders) may be compared with a copy existing on the same device (disk,CD-ROM,floppy) or another device. QVerify will detect bad, missing, or extra files or folders.QVerify has the following features: Verifies that two files are identical. Verifies that two folders (including sub-folders) are identical. Verifies that two disks are identical. Lists missing or extra folders. Lists missing or extra files. Lists bad files (files with different Sizes, Modified Times, or Data). Home <http://www.edinaz.com/index.html>

Register to Reply
Register to Reply 15 comments
Copy to Clipboard

Users who posted comments:

bubbapebi (1); Ezekiel49 (3); Faustfix (1); Haajee (1); jaycdc (5); jmoliere (1); vermin (3)

Previous in Forum: RDbMS   Next in Forum: Scanning JPEG ~ Word (or similar)

Advertisement