View previous topic :: View next topic
|
Author |
Message |
amargallani
New User
Joined: 04 May 2010 Posts: 5 Location: ballarpur
|
|
|
|
I have a file and I want to know the file is in sorted order. I can do this by opening a file in view mode and type SORT on the command line the it will give if it is file already in sorted order
I have 300+ files and i dont want to do it manually, I thought of this solution:
1.Sort the FILEA into PDS FILEA.SORT
2. Compare the Original FileA with FILA.SORT
3. If ther is a no mismatch the file is already in sorted order
else file is not in sorted order.
I need a help in comparing FILEA and FILE.SORT, can any body tell me if there is any command which can do this compare |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the requirement is quite obscure!
if You need the file to be sorted just sort it and get rid of the unsorted one
but on the other hand
if it is not sorted what are You going to do about it ?
waiting for an explanation |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
well,
since you are going to sort them anyway for your compare,
I would suggest skipping the compare
and just sort them all, and change names if necessary. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the ts was explaining the intended process
sort the unknown_state_file and compare the sorted with the original
if they match literally the original is sorted
convoluted thinking huh?! |
|
Back to top |
|
|
|