-
For csv files, is there a way in the current version of Miller to change the (output) file format line endings from the default \n (in Linux and MacOS) to \r\n considering that the file will be consumed on a Windows platform? Running the following on MacOS, mlr v6.12, I've noticed that when I start with a source file with \r\n line endings, the output file has unix-style line endings: I found this older documentation referring to version 5.5. The "Autodetect of line endings" section at the bottom of the page seems to suggest you could explicitly specify the Output Record Separator, --ors. The latest documentation for v6.12 suggests the output record separator is not alterable for csv files (see "Which separators apply to which file formats", at the bottom of the page): When I tried adding I typically do the file format conversion to Windows line endings in a text editor, but was looking to save a step by doing it in the mlr put statement. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
OT: If you don't have to manage and if you don't have carriage returns inside cell values, you can use classic shell commands
|
Beta Was this translation helpful? Give feedback.
-
Yes. As of Miller 6 I stopped trying to manage line endings, letting the Go I/O libraries handle it. Meanwhile, Miller has a few "auxiliary entry points": these are basically little standalone programs bundled with Miller.
Effectively, These are not verbs -- so you cannot do
|
Beta Was this translation helpful? Give feedback.
Yes. As of Miller 6 I stopped trying to manage line endings, letting the Go I/O libraries handle it.
Meanwhile, Miller has a few "auxiliary entry points": these are basically little standalone programs bundled with Miller.
mlr help auxents
mlr termcvt