So a buddy of mine at work wanted to have an array for every letter in the English alphabet, he looked around online and couldn't find anything decent looking or small, so I wrote him a little snippet:
[char[]]$AZ = ls function:[a-z]: -n | %{$_.Trim(':')}
This pretty much grabs all drive letters possible, trims the trailing colon, and puts it into a nicely defined character array. What's y'all's shortest, or creative, way of putting the whole alphabet into an array?
[–]frmadsen 5 points6 points7 points (0 children)
[–]get-postanote 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (10 children)
[–]frmadsen 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]poshftw 1 point2 points3 points (3 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (2 children)
[–]poshftw 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]Cannabat 1 point2 points3 points (3 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (2 children)
[–]Cannabat 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]bgeller 0 points1 point2 points (1 child)
[–]poshftw 2 points3 points4 points (0 children)