Skip to content

Instantly share code, notes, and snippets.

@WilliamQLiu
Created May 14, 2015 14:41
Show Gist options
  • Save WilliamQLiu/4fefdeb1f39e97ab4b75 to your computer and use it in GitHub Desktop.
Save WilliamQLiu/4fefdeb1f39e97ab4b75 to your computer and use it in GitHub Desktop.
Windows equivalent of head, pipe, write to file
#In powershell, do this to load a file named "load_me.csv", get first 10000 lines, then output it to "test.csv"
powershell -command "& {Get-Content load_me.csv -TotalCount 10000" | Out-File test.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment