How can I keep UNIX LF line endings?
问题 I have a large (9 GiB), ASCII encoded, pipe delimited file with UNIX-style line endings; 0x0A. I want to sample the first 100 records into a file for investigation. The following will produce 100 records (1 header record and 99 data records). However, it changes the line endings to DOS/Winodws style; CRLF, 0x0D0A. Get-Content -Path .\wellmed_hce_elig_20191223.txt | Select-Object -first 100 | Out-File -FilePath .\elig.txt -Encoding ascii I know about iconv, recode, and dos2unix. Those programs