Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Sort an Array of Numbers with PowerShell

$
0
0

Summary: Learn how to sort an array of numbers with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily sort an array of numbers?

Hey, Scripting Guy! Answer Pipe the array to the Sort-Object (sort is an alias) cmdlet, for example:

$a = 1,2,7,6,4,3,3,2,9

$a | sort


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>