Web lists-archives.com

Re: [Mingw-msys] Description of MSYS in forthcoming C++ Cookbook, by O'Reilly




Stephen Grant Brown wrote:
> Hi All,
>  
> Where do I find the command unix2dos?
>  
About three days ago that very item showed up on this list.
The examples given then use sed or perl, choose your favorite weapon.

Keith Marshall wrote:
> <script name=dos2unix>
> #!/bin/sh
> sed -n p "$@"
> </script>
>
> <script name=unix2dos>
> #!/bin/sh
> sed -n p "$@" | awk '{print $0"\r"}'
> </script>
>

John Clizbe wrote:
> If you've installed perl, which is probably a safe bet:
>
> jpclizbe@yogi:~$ cat << EOF > /usr/local/bin/unix2dos
> #!/usr/bin/perl -pi
> s/\n/\r\n/;
> EOF
>
> jpclizbe@yogi:~$ cat << EOF /usr/local/bin/dos2unix
> #!/usr/bin/perl -pi
> s/\r\n/\n/;
> EOF

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Mingw-msys mailing list
Mingw-msys@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/mingw-msys