On May 29, 11:19 pm, "Keith Hill [MVP]"
<r_keith_h...@mailhot.nospamIdotcom> wrote:
> "Keith Hill [MVP]" <r_keith_h...@mailhot.nospamIdotcom> wrote in messagenews:582AD6C1-9B7B-463E-AE9D-9FA4C53BC03F@microsoft.com...
>
> > Pretty simply:
>
> > gc foo.txt | sort {$_.split(',')[2]} > bar.txt
>
> Missed the descending order, so that would be:
>
> gc foo.txt | sort {$_.split(',')[2]} -desc > foo_sorted.txt
>
> --
> Keith
Keith, Thank you for your reply. I am amazed with how much can be
done with one line of code in PowerShell
Howard