Skip to content

Misc Snippets

PHIntelligence edited this page Nov 21, 2019 · 6 revisions

Use Windows PowerShell to perform a row count on a text or csv file (slow)

Get-Content filename.csv | Measure-Object -line

Use GitBash to perform a row count on a large text or csv file (fast)

wc -l filename.csv

The same thing using R

read.table(pipe("C:\\Install Folder\\Rtools\\bin\\wc -l filename.csv"))[[1]]
Clone this wiki locally