Sign in to follow this  
Followers 0
JimC

I need to sort the enclosed file by the number after the equal sign

4 posts in this topic

I need to sort the enclosed file to be sorted by the number after the "=" sign.

The following is a sample that is incorrect.

CX_44973.inf= 1027,,,,,,,1027,0,0

ativvpxx.vp= 1028,,,,,,,1028,0,0

ativvaxx.dll= 1028,,,,,,,1028,0,0

ativvaxx.dat= 1028,,,,,,,1028,0,0

ativdkxx.vp= 1028,,,,,,,1028,0,0

ativckxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.cpa= 1028,,,,,,,1028,0,0

atitvo32.dll= 1028,,,,,,,1028,0,0

atipdlxx.dll= 1028,,,,,,,1028,0,0

atioglxx.dll= 1028,,,,,,,1028,0,0

atikvmag.dll= 1028,,,,,,,1028,0,0

atiiiexx.dll= 1028,,,,,,,1028,0,0

atiicdxx.dat= 1028,,,,,,,1028,0,0

atifglpf.xml= 1028,,,,,,,1028,0,0

atidemgx.dll= 1028,,,,,,,1028,0,0

atiddc.dll= 1028,,,,,,,1028,0,0

ati3duag.dll= 1028,,,,,,,1028,0,0

ati2mtag.sys= 1028,,,,,,,1028,0,0

ati2mdxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.dll= 1028,,,,,,,1028,0,0

ati2erec.dll= 1028,,,,,,,1028,0,0

ati2edxx.dll= 1028,,,,,,,1028,0,0

ati2dvag.dll= 1028,,,,,,,1028,0,0

ati2cqag.dll= 1028,,,,,,,1028,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

This is an example of how it should look.

CX_44973.inf= 1027,,,,,,,1027,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

ativvpxx.vp= 1028,,,,,,,1028,0,0

ativvaxx.dll= 1028,,,,,,,1028,0,0

ativvaxx.dat= 1028,,,,,,,1028,0,0

ativdkxx.vp= 1028,,,,,,,1028,0,0

ativckxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.cpa= 1028,,,,,,,1028,0,0

atitvo32.dll= 1028,,,,,,,1028,0,0

atipdlxx.dll= 1028,,,,,,,1028,0,0

atioglxx.dll= 1028,,,,,,,1028,0,0

atikvmag.dll= 1028,,,,,,,1028,0,0

atiiiexx.dll= 1028,,,,,,,1028,0,0

atiicdxx.dat= 1028,,,,,,,1028,0,0

atifglpf.xml= 1028,,,,,,,1028,0,0

atidemgx.dll= 1028,,,,,,,1028,0,0

atiddc.dll= 1028,,,,,,,1028,0,0

ati3duag.dll= 1028,,,,,,,1028,0,0

ati2mtag.sys= 1028,,,,,,,1028,0,0

ati2mdxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.dll= 1028,,,,,,,1028,0,0

ati2erec.dll= 1028,,,,,,,1028,0,0

ati2edxx.dll= 1028,,,,,,,1028,0,0

ati2dvag.dll= 1028,,,,,,,1028,0,0

ati2cqag.dll= 1028,,,,,,,1028,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

Thank you in advance for any help provided in resolving my issue.

txtsetp3.txt

Share this post


Link to post
Share on other sites



I need to sort the enclosed file to be sorted by the number after the "=" sign.

Correct me if I'm wrong, but it appears the file you attached is sorted by the number after the equals sign. Am I missing something?

Share this post


Link to post
Share on other sites

Sorry I attached the file I manually corrected.

Thanks,

I need to sort the enclosed file to be sorted by the number after the "=" sign.

The following is a sample that is incorrect.

CX_44973.inf= 1027,,,,,,,1027,0,0

ativvpxx.vp= 1028,,,,,,,1028,0,0

ativvaxx.dll= 1028,,,,,,,1028,0,0

ativvaxx.dat= 1028,,,,,,,1028,0,0

ativdkxx.vp= 1028,,,,,,,1028,0,0

ativckxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.cpa= 1028,,,,,,,1028,0,0

atitvo32.dll= 1028,,,,,,,1028,0,0

atipdlxx.dll= 1028,,,,,,,1028,0,0

atioglxx.dll= 1028,,,,,,,1028,0,0

atikvmag.dll= 1028,,,,,,,1028,0,0

atiiiexx.dll= 1028,,,,,,,1028,0,0

atiicdxx.dat= 1028,,,,,,,1028,0,0

atifglpf.xml= 1028,,,,,,,1028,0,0

atidemgx.dll= 1028,,,,,,,1028,0,0

atiddc.dll= 1028,,,,,,,1028,0,0

ati3duag.dll= 1028,,,,,,,1028,0,0

ati2mtag.sys= 1028,,,,,,,1028,0,0

ati2mdxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.dll= 1028,,,,,,,1028,0,0

ati2erec.dll= 1028,,,,,,,1028,0,0

ati2edxx.dll= 1028,,,,,,,1028,0,0

ati2dvag.dll= 1028,,,,,,,1028,0,0

ati2cqag.dll= 1028,,,,,,,1028,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

This is an example of how it should look.

CX_44973.inf= 1027,,,,,,,1027,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

ativvpxx.vp= 1028,,,,,,,1028,0,0

ativvaxx.dll= 1028,,,,,,,1028,0,0

ativvaxx.dat= 1028,,,,,,,1028,0,0

ativdkxx.vp= 1028,,,,,,,1028,0,0

ativckxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.vp= 1028,,,,,,,1028,0,0

ativcaxx.cpa= 1028,,,,,,,1028,0,0

atitvo32.dll= 1028,,,,,,,1028,0,0

atipdlxx.dll= 1028,,,,,,,1028,0,0

atioglxx.dll= 1028,,,,,,,1028,0,0

atikvmag.dll= 1028,,,,,,,1028,0,0

atiiiexx.dll= 1028,,,,,,,1028,0,0

atiicdxx.dat= 1028,,,,,,,1028,0,0

atifglpf.xml= 1028,,,,,,,1028,0,0

atidemgx.dll= 1028,,,,,,,1028,0,0

atiddc.dll= 1028,,,,,,,1028,0,0

ati3duag.dll= 1028,,,,,,,1028,0,0

ati2mtag.sys= 1028,,,,,,,1028,0,0

ati2mdxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.exe= 1028,,,,,,,1028,0,0

ati2evxx.dll= 1028,,,,,,,1028,0,0

ati2erec.dll= 1028,,,,,,,1028,0,0

ati2edxx.dll= 1028,,,,,,,1028,0,0

ati2dvag.dll= 1028,,,,,,,1028,0,0

ati2cqag.dll= 1028,,,,,,,1028,0,0

CX_44973.cat= 1027,,,,,,,1027,0,0

Thank you in advance for any help provided in resolving my issue.

txtsetp3.txt

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I just copy pasted the list into the file instead of downloading, but look at this;

#include <Array.au3>
#include <file.au3>

Dim $avArray

_FileReadToArray("txtsetp3.txt", $avArray)
For $i = 1 To UBound($avArray) - 1
    $icount = StringInStr($avArray[$i], "=")
    $avArray[$i] =StringTrimLeft($avArray[$i], $icount + 1)
Next
_ArrayDisplay($avArray, "Unsorted")
_ArraySort($avArray, 0, 1)
_ArrayDisplay($avArray, "Sorted")

That should work for you, let me know if it doesn't.

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0