The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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-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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
Stin Stin is offline
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
  #2 (permalink)  
Old 07-04-2008
Stin Stin is offline
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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