Sign in to follow this  
Followers 0

tring to use several things to sort a section off a file

3 posts in this topic

I have tried to sort the [setupHotfixesToRun] section of the svcpack.inf file, but have had no luck. I have tried loading to a temp file and using _arraysort, but no luck. Any ideas ?

Thanks in advance for any suggestions.






Signature="$WINDOWS NT$"




KB935840.exe /q /n /z /b:SP2GDR

KB935839.exe /q /n /z /b:SP2GDR

KB933566.exe /q /n /z /b:SP2GDR

KB932168.exe /q /n /z /b:SP2GDR

KB931784.exe /q /n /z /b:SP2GDR

KB931261.exe /q /n /z /b:SP2GDR

KB930178.exe /q /n /z /b:SP2GDR

KB929969.exe /q /n /z /b:SP2GDR

KB928843.exe /q /n /z /b:SP2GDR

KB928255.exe /q /n /z /b:SP2GDR

KB927802.exe /q /n /z /b:SP2GDR

KB927779.exe /q /n /z /b:SP2GDR

KB926436.exe /q /n /z /b:SP2GDR

KB926255.exe /q /n /z /b:SP2GDR

KB926247.exe /q /n /z /b:SP2GDR

KB925902.exe /q /n /z /b:SP2GDR

KB925486.exe /q /n /z /b:SP2GDR

KB925454.exe /q /n /z /b:SP2GDR

KB924667.exe /q /n /z /b:SP2QFE

KB924496.exe /q /n /z /b:SP2GDR

KB924270.exe /q /n /z /b:SP2GDR

KB924191.exe /q /n /z /b:SP2GDR

KB923980.exe /q /n /z /b:SP2GDR

KB923689.exe /q /n /z

KB923414.exe /q /n /z /b:SP2GDR

KB923191.exe /q /n /z /b:SP2QFE

KB922819.exe /q /n /z /b:SP2GDR

KB922760.exe /q /n /z /b:SP2GDR

KB920685.exe /q /n /z /b:SP2GDR

KB920683.exe /q /n /z /b:SP2GDR

KB920670.exe /q /n /z /b:SP2GDR

KB920214.exe /q /n /z /b:SP2GDR

KB920213.exe /q /n /z /b:SP2GDR

KB919007.exe /q /n /z /b:SP2GDR

KB918439.exe /q /n /z /b:SP2GDR

KB917953.exe /q /n /z /b:SP2GDR

KB917537.exe /q /n /z /b:SP2GDR

KB917422.exe /q /n /z /b:SP2GDR

KB917344.exe /q /n /z /b:SP2GDR

KB914389.exe /q /n /z /b:SP2GDR

KB914388.exe /q /n /z /b:SP2GDR

KB913580.exe /q /n /z /b:SP2GDR

KB912919.exe /q /n /z /b:SP2GDR

KB911927.exe /q /n /z /b:SP2GDR

KB911280.exe /q /n /z /b:SP2GDR

KB908531.exe /q /n /z /b:SP2GDR

KB908519.exe /q /n /z /b:SP2GDR

KB905749.exe /q /n /z

KB905414.exe /q /n /z

KB904706.exe /q /n /z /b:SP2GDR

KB902400.exe /q /n /z

KB901214.exe /q /n /z

KB901017.exe /q /n /z

KB900725.exe /q /n /z

KB899591.exe /q /n /z

KB899589.exe /q /n /z

KB899587.exe /q /n /z

KB896688.exe /q /n /z

KB896428.exe /q /n /z

KB896423.exe /q /n /z

KB896422.exe /q /n /z

KB896358.exe /q /n /z

KB893756.exe /q /n /z

KB893066.exe /q /n /z

KB891781.exe /q /n /z

KB890859.exe /q /n /z

KB890175.exe /q /n /z

KB890046.exe /q /n /z

KB888302.exe /q /n /z

KB887472.exe /q /n /z

KB885836.exe /q /n /z

KB885250.exe /q /n /z

KB883667.exe /q /n /z

KB873339.exe /q /n /z

KB911564.exe /q /n /z

KB893803v2.exe /q /n /z


Share this post

Link to post
Share on other sites

If read to an array, _arraysort should work just fine. It didn't work for you?

Did you read it all to the array ok?

maybe remove everything after "*.exe" or "*.cat" then _arraysort

Share this post

Link to post
Share on other sites

#3 ·  Posted (edited)

Just put the content you want sorted into a text file and this script should do the trick:

#include <File.au3>
#include <Array.au3>
Dim $arr
_FileReadToArray("C:\test.txt", $arr)
Dim $newarr[UBound($arr)]
For $i = 1 to UBound($arr) - 1
    $newarr[$i] = StringMid($arr[$i], 3)
For $i = 1 to UBound($newarr) - 1
    $newarr[$i] = "KB"&$newarr[$i]
_ArrayDisplay ($newarr)

maybe remove everything after "*.exe" or "*.cat" then _arraysort

removing the leading KB did the trick :) Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

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