Skip to content

Instantly share code, notes, and snippets.

@poshcodebear
Created July 31, 2015 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poshcodebear/d6c9f789dc7de6ebb217 to your computer and use it in GitHub Desktop.
Save poshcodebear/d6c9f789dc7de6ebb217 to your computer and use it in GitHub Desktop.
Removing the first or last lines from a text file - Sample 1
$test = Get-Content .\test.txt
$output = $test[0..($test.count - 2)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment