![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| using cksum | leeRoberts2007 | Shell Programming and Scripting | 4 | 05-31-2007 06:30 PM |
| Sorting/Filed Defining/Output problem | TiredOrangeCat | Shell Programming and Scripting | 1 | 02-11-2007 08:41 PM |
| sorting output | funksen | Shell Programming and Scripting | 3 | 01-09-2007 01:12 AM |
| Sorting problem "sort -k 16,29 sample.txt > output.txt" | ganapati | Shell Programming and Scripting | 3 | 08-01-2006 02:55 AM |
| Sorting "ls" output on more than 1 column | Nicol | UNIX for Dummies Questions & Answers | 1 | 09-20-2005 04:37 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
sorting cksum output.
Hi guys,
I have a service directory with a lot of files in. I have to cksum the whole directory and compare it to a release note document. However the problem I have is the files are listed in different lines when running cksum as they are in the release doc. Therefore cksum shows differences. The release note cksums are in a table in a work doc. I can cut and paste to a notepad and then paste into a file using vi. It creates different white space in the fields but I get around this with diff -w. If I have the cksums from the release notes in a file called Release_note.cksum and the output the result of cksum * to a file called directory.cksum, is there anything I can do to sort these output and save them each to another file and then diff the 2 sorted files? Many thanks in anticipation. Stin |
| Forum Sponsor | ||
|
|
|
|||
|
OK. This works:
$ cd /some /random/directory $ find * -type f -exec cksum {}; | sort -k 3 | sed 's/\.\///' > filename This gives the sorted cksum output into a file. Paste the release note cksums into a file then: $ more release_note.cksum | sort -k 3 | sed 's/\.\///' > release_note_sorted Compare the 2 sorted files: $ diff -w filename release_note_sorted |
|||
| Google UNIX.COM |