Skip to main content
100%

Windows equivalent of head, pipe, write to file

✓ Published0🌍 Public
WWilliamQLiu
Last edited May 14, 2015
Created on May 14, 2015

This example demonstrates a PowerShell command that reads the first 10,000 lines of a CSV file named `load_me.csv` and writes them to a new file called `test.csv`. It shows how to truncate a large dataset for quick inspection or further processing. The code uses the `Get-Content` cmdlet with the `-TotalCount` parameter to limit the line count, and pipes the output through `Out-File` to save the result. This approach provides a lightweight, command-line method for sampling data before loading it into a visualization tool.

AI-generated description

Similar vizzes