Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Last active January 3, 2018 19:46
Show Gist options
  • Save royashbrook/a609a8e590931378268c57869ec00d51 to your computer and use it in GitHub Desktop.
Save royashbrook/a609a8e590931378268c57869ec00d51 to your computer and use it in GitHub Desktop.
#Import CSV, dynamically generate column names
Import-Csv -Header (00..( (gc file.csv)[0].split(",").Count-1 )|%{"c{0}" -f $_}) -Path file.csv
#ternary
@('false','true')[$true]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment