You stated it pretty clearly. It's just rather complex and tedious.
Here's a working version that does basically what you want, as best I can understand. It does not put the results in each directory, but all together in one file. Putting the results in different directories would complicate the script, and it seems having one results file might be easier to use? I think you could modify the script to add other details as needed. I think the script is pretty clear. It uses simple commands, but is just kind of tedious. Let me know if any questions.
Thanks MadeInGermany and Hanson44.
Script worked as expected. Thank you.
Am trying to improve the script by keeping menu driven approach ie, one script should do both
a. Line by Line file comparision
b. Word by word file comparision
Can you helpme on how to do the Word by word file comparision ?
when i run the script, it gives result for only one sub-dir file comparision even though there are multiple sub-dir's.
Input :
ls -R oldfiles newfile
resultfile :
from the above input, resultfile is missing information for dirDCP/dirDCP.txt.
---------- Post updated at 07:06 AM ---------- Previous update was at 06:41 AM ----------
finally found some solution wrt to word by word comparision and does the trick. now i need to incroprate this simple script to the above script, so that one script does both word by word comparision and line by line comparision as well.
created 2 dummy file a.txt and b.txt
input file looks like :
result :
anyhelp please on how to add the filename/line number in the result file. so that it will be come easy to find out on which file had issue
In the example below i would want the extensions to match.
Is there any other utility or script to achieve this. Kindly help.
Example:
sdiff sourceFileNames targetFileNames
17021701P.blf | 17021901P.ibk
17021701P.chn | 17021901P.irk
17021701P.bmr | 17021901P.dyd
17021701P.dpf |... (7 Replies)
Hello guys,
I have a problem. I'm trying to use SDiff with two files which are containing spaces.
My problem is that I want to save the output with > in an extra file.
If I try to use it like this.
sdiff "test file1" "test file2" > OutputfileI get this message:
usage: diff ... (11 Replies)
I want to compare two files, 1) Compare Each query result. 2) Compare Only first row of the Query output 3) Compare Time (3rd column), First file time is lesser than 2nd file then print the PO_NUM else do nothing.
File1:
C:\script>call transaction 1OPOP
C:\script>Select ID, PO_ID, TIME, DES... (3 Replies)
Hi All,
I have written the shell script which does the following :
a. Reads the *.cnf file content from the specified input folder path
b. Grep's some strings from the *.cnf file and writes the output in result file(*.cnf_result.txt) in output folder
c. Now, if we get new version of... (5 Replies)
Hi,
I'm trying to use sdiff by parsing the output of another command instead of the filename:
sdiff <(echo test1) <(echo test2)However, this seems to cause my terminal session to stop working.
If I use it with normal diff it works fine:
~$ diff <(echo test1) <(echo test2)
1c1
< test1... (4 Replies)
I have a script which generates recursively some files in folders for a given root folder.
I have checks for permissions and it works for all folders except one(i have 777 permission on it). When i try calling the script in problematic folder(problematic folder being root folder), script works as... (2 Replies)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name.
For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
HI
i wil get input from sql query and that too i can get a list o f files or just one.
i have to pick up a file from another directory which hads prefix to this prefix.x.x.x.x.x. And we have to discard prefix and use that file name.
we have to compare this file name(no need... (0 Replies)