Try treating the content like a .csv file and using
Import-Csv (Microsoft.PowerShell.Utility) - PowerShell | Microsoft Learn[
^] to create a set of custom objects. You should then be able to sort the objects.
[edit]
This seems to work:
$A = Import-Csv -Path .\test.txt -Delimiter " " -Header 'One','Two','Three'
$A | Where-Object -Property Two -Like "z" | Sort-Object { [int]$_.Three }
Note, I used
int
rather than
double
since all the values are integral numbers.
[/edit]