Stream Files and End-of-Line Delimiters, Take Three
November 15, 2006 Hey, Ted
I do a bit of development in Cygwin under Windows and then move it to the iSeries using Qshell. It turns out that Qshell doesn’t like the carriage-return/linefeed combination (CRLF) in shell scripts, so I often need to change CRLF to LF–as you wrote about in two previous articles–in bulk. Here are some methods I use to convert end-of-line delimiters in stream files. The first method is a simple Perl command. perl -i.bak -pe 's/rn/n/g' * This command adds the extension .bak to the end of the files and strips the CRLF, putting in LF instead. By using a wildcard, |