Skip to content

Instantly share code, notes, and snippets.

@markwragg
Last active September 12, 2016 10:27
Show Gist options
  • Save markwragg/a4ab2f17af3052e81ddd2987db21e42a to your computer and use it in GitHub Desktop.
Save markwragg/a4ab2f17af3052e81ddd2987db21e42a to your computer and use it in GitHub Desktop.
Powershell command to sort an array of values and output as a comma separated list.
( @(53,88,135,389,636,3268) | Sort-Object | Out-String | ForEach-Object{$_ -replace '\n', ','} ).TrimEnd(',')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment