![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| concatenate files sorted by date | docaia | Shell Programming and Scripting | 2 | 08-15-2008 11:23 PM |
| executing code on files in the sorted order -help! | epi8 | Shell Programming and Scripting | 1 | 05-20-2008 12:30 AM |
| Compare two files | amir07 | Shell Programming and Scripting | 6 | 03-26-2008 08:23 AM |
| Compare files | kharen11 | UNIX for Advanced & Expert Users | 25 | 03-14-2007 02:35 AM |
| help! need to compare files | danielsf | Shell Programming and Scripting | 6 | 07-09-2003 02:09 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
|||
|
|||
|
Hi,
Some remarks first: 1. the 'grep -x -v -f' command *perfectly* works (it simply depends on the way you're using it...). 2. your files (EAIDVBR1.txt EAIDQBR1.txt) are DOS-formatted and contains many blank characters... (this explains why most of the Unix diff commands seem to fail). As a consequence, following the steps below should provide the expected results: # 1. Convert and cleanup the input files for FILE in EAIDVBR1.txt EAIDQBR1.txt; \ do \ echo "... converting ${FILE}"; \ dos2ux ${FILE} | sed -e 's@ @@g' > ${FILE}.new; \ done # 2. Get the required differences (strings in EAIDQBR1.txt # which do not appear in EAIDVBR1.txt) grep -x -v -f EAIDVBR1.txt.new EAIDQBR1.txt.new |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|