JimC Posted April 15, 2008 Posted April 15, 2008 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
joshtp Posted April 15, 2008 Posted April 15, 2008 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?
JimC Posted April 15, 2008 Author Posted April 15, 2008 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,0ativvpxx.vp= 1028,,,,,,,1028,0,0ativvaxx.dll= 1028,,,,,,,1028,0,0ativvaxx.dat= 1028,,,,,,,1028,0,0ativdkxx.vp= 1028,,,,,,,1028,0,0ativckxx.vp= 1028,,,,,,,1028,0,0ativcaxx.vp= 1028,,,,,,,1028,0,0ativcaxx.cpa= 1028,,,,,,,1028,0,0atitvo32.dll= 1028,,,,,,,1028,0,0atipdlxx.dll= 1028,,,,,,,1028,0,0atioglxx.dll= 1028,,,,,,,1028,0,0atikvmag.dll= 1028,,,,,,,1028,0,0atiiiexx.dll= 1028,,,,,,,1028,0,0atiicdxx.dat= 1028,,,,,,,1028,0,0atifglpf.xml= 1028,,,,,,,1028,0,0atidemgx.dll= 1028,,,,,,,1028,0,0atiddc.dll= 1028,,,,,,,1028,0,0ati3duag.dll= 1028,,,,,,,1028,0,0ati2mtag.sys= 1028,,,,,,,1028,0,0ati2mdxx.exe= 1028,,,,,,,1028,0,0ati2evxx.exe= 1028,,,,,,,1028,0,0ati2evxx.dll= 1028,,,,,,,1028,0,0ati2erec.dll= 1028,,,,,,,1028,0,0ati2edxx.dll= 1028,,,,,,,1028,0,0ati2dvag.dll= 1028,,,,,,,1028,0,0ati2cqag.dll= 1028,,,,,,,1028,0,0CX_44973.cat= 1027,,,,,,,1027,0,0This is an example of how it should look.CX_44973.inf= 1027,,,,,,,1027,0,0CX_44973.cat= 1027,,,,,,,1027,0,0ativvpxx.vp= 1028,,,,,,,1028,0,0ativvaxx.dll= 1028,,,,,,,1028,0,0ativvaxx.dat= 1028,,,,,,,1028,0,0ativdkxx.vp= 1028,,,,,,,1028,0,0ativckxx.vp= 1028,,,,,,,1028,0,0ativcaxx.vp= 1028,,,,,,,1028,0,0ativcaxx.cpa= 1028,,,,,,,1028,0,0atitvo32.dll= 1028,,,,,,,1028,0,0atipdlxx.dll= 1028,,,,,,,1028,0,0atioglxx.dll= 1028,,,,,,,1028,0,0atikvmag.dll= 1028,,,,,,,1028,0,0atiiiexx.dll= 1028,,,,,,,1028,0,0atiicdxx.dat= 1028,,,,,,,1028,0,0atifglpf.xml= 1028,,,,,,,1028,0,0atidemgx.dll= 1028,,,,,,,1028,0,0atiddc.dll= 1028,,,,,,,1028,0,0ati3duag.dll= 1028,,,,,,,1028,0,0ati2mtag.sys= 1028,,,,,,,1028,0,0ati2mdxx.exe= 1028,,,,,,,1028,0,0ati2evxx.exe= 1028,,,,,,,1028,0,0ati2evxx.dll= 1028,,,,,,,1028,0,0ati2erec.dll= 1028,,,,,,,1028,0,0ati2edxx.dll= 1028,,,,,,,1028,0,0ati2dvag.dll= 1028,,,,,,,1028,0,0ati2cqag.dll= 1028,,,,,,,1028,0,0CX_44973.cat= 1027,,,,,,,1027,0,0Thank you in advance for any help provided in resolving my issue.txtsetp3.txt
someone Posted April 15, 2008 Posted April 15, 2008 (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 April 15, 2008 by someone While ProcessExists('Andrews bad day.exe') BlockInput(1) SoundPlay('Music.wav') SoundSetWaveVolume('Louder') WEnd
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now