Skip to content

dos2unix

Mahmoud Ben Hassine edited this page Nov 21, 2015 · 4 revisions

dos2unix

Synopsis

Replaces Windows line separators (CRLF) by Unix line separators (LF).

Parameters

N/A

Example

Stream<String> stream = Stream.of("a\r\n", "b\r\nc\r\n");

UnixStream.unixify(stream)
   .dos2unix()
   .to(stdOut()); // prints "a\n", "b\nc\n"

// Or

UnixStream.from(stream)
   .pipe(dos2unix())
   .to(stdOut()); // prints "a\n", "b\nc\n"

// Or

stream
    .map(Functions.dos2unix())
    .forEach(System.out::println); // prints "a\n", "b\nc\n"