retrieve only first line of data in csv

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of David Schmidtberger David Schmidtberger 1 month, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #49555

    silly question i know, but can't seem to get anything to easily work.

    I need to extract the first line of data from a csv file. the files will have many entries, but i only need the first line to calculate some other values for further processing.

    #49559
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Import-CSV whatever.csv | Select -First 1

    #49561

    wow, you rock Don, i'd seen it used in get-content, for some reason didn't even think to try with import-csv

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.