![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| using cksum | leeRoberts2007 | Shell Programming and Scripting | 4 | 05-31-2007 09:30 PM |
| Sorting/Filed Defining/Output problem | TiredOrangeCat | Shell Programming and Scripting | 1 | 02-12-2007 12:41 AM |
| sorting output | funksen | Shell Programming and Scripting | 3 | 01-09-2007 05:12 AM |
| Sorting problem "sort -k 16,29 sample.txt > output.txt" | ganapati | Shell Programming and Scripting | 3 | 08-01-2006 05:55 AM |
| Sorting "ls" output on more than 1 column | Nicol | UNIX for Dummies Questions & Answers | 1 | 09-20-2005 07:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 |
|
||||
|
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 |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|