The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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-11-2007 11:41 PM
sorting output funksen Shell Programming and Scripting 3 01-09-2007 04: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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: Mar 2008
Posts: 28
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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-04-2008
Registered User
 

Join Date: Mar 2008
Posts: 28
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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Bookmarks

Tags
None

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 09:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66