powershell - select -first 1 on a large file -
i trying run following command on large text file. however, it's slow
((cat largefile.txt | select -first 1).split(",")).count()  is alternative fast way in powershell? seems command scan whole file no matter what.
to first x number of lines in text file, use âtotalcount parameter:
((get-content largefile.txt -totalcount 1).split(",")).count  
Comments
Post a Comment