delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/29/17:43:39

From: cwilson AT ee DOT gatech DOT edu (Charles Wilson)
Subject: Re: Documentation & other questions
29 Sep 1998 17:43:39 -0700 :
Message-ID: <3610708A.1A1E068B.cygnus.gnu-win32@ece.gatech.edu>
References: <360f598d DOT 74592448 AT neptune>
Mime-Version: 1.0
To: Alex Oren <alexo AT bigfoot DOT com>
Cc: gnu-win32 AT cygnus DOT com

I put the following snippet in my .bashrc:

d2u() {
        for p in $*
        do
                cat $p | tr "\r\n" "\n" > /tmp/$p.tmp
                mv /tmp/$p.tmp $p
        done
}

then, you can do :

d2u *.txt

and all the .txt files will automagically be converted from DOS to UNIX

--Chuck Wilson

Alex Oren wrote:

> Hello.
>
> I just got on this list so if my questions are not appropriate here, please
> direct me to where they can be (or a FAQ, if there is one).
>
> Please keep in mind that I am not a UNIX person so I may miss the obvious.
>
> I installed the Cygwin tools but I can't find any documentation on them.  Is
> there any available?  A windows help file will be best but any other format is
> fine as long as there is a tool to format/read it.
>
> Another question: How can I convert text files between UNIX format (LF) and
> DOS/Windows format (CR/LF)?  I looked at tr but it seems to me it only
> performs 1-to-1 character translations.
>
> Thanxalot!
>
> Have fun,
> Alex.
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019