Subject: Re: Documentation & other questions
From: [email-masked] (Charles Wilson)

29 Sep 1998 17:43:39 -0700
Message-ID: <[email-masked]>
References: <360f598d.74592448@neptune>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Alex Oren <[email-masked]>
Cc: [email-masked]

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
> "[email-masked]" with one line of text: "help".

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".