From chemistry-request@server.ccl.net  Tue Feb 29 12:29:42 2000
Received: from gensig.nibsc.ac.uk (gensig.nibsc.ac.uk [193.62.43.13])
	by server.ccl.net (8.8.7/8.8.7) with ESMTP id MAA27832
	for <chemistry@server.ccl.net>; Tue, 29 Feb 2000 12:29:40 -0500
Received: from nibsc.ac.uk (dlinmf.nibsc.ac.uk [193.62.42.144]) by gensig.nibsc.ac.uk (980427.SGI.8.8.8/970903.SGI.AUTOCF) via ESMTP id RAA08592 for <chemistry@www.ccl.net>; Tue, 29 Feb 2000 17:28:56 GMT
Message-ID: <38BC01C0.95A06A7A@nibsc.ac.uk>
Date: Tue, 29 Feb 2000 17:28:32 +0000
From: Mark Forster <mforster@nibsc.ac.uk>
Organization: NIBSC
X-Mailer: Mozilla 4.05 [en] (Win95; I)
MIME-Version: 1.0
To: chemistry@server.ccl.net
Subject: Re: CCL:Text file transfer between linux and dos
References: <Pine.LNX.4.10.10002291721340.29813-100000@server.theo.chemie.tu-muenchen.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear CCL

Here is a short perl script (crlf.pl) that will fix this problem
for you. The usage is:

    crlf.pl dosfile.txt > unixfile.txt

Hope this helps

Mark F

----quote---
#!/usr/local/bin/perl

while (<>) {

        $a=$_;
        $a =~ s/[\012]//;
        $a =~ s/[\015]//;
        print "$a\n";

}
---unquote---

Robert Krawczyk wrote:

> On Tue, 29 Feb 2000, Yubo Fan wrote:
>
> > Hi,
> >
> > I have installed Windows 98 and RedHat Linux 6.1 on my PC. Usually I
> > edit G98 input file on Windows 98. The problem is when I start Linux and
> > mount the DOS partitions, I cannot copy the input files correctly. "^M"
>
> This is due to the different line end. On MS-DOS the line ands with a
> CR/LF-Pair, UNIX uses LF. You will need the freely available utilities
> dos2unix or you can use (X)Emacs to convert the line ends (query replace).
>
> Hope that helps...
>
> Robert
>
> > was added to the end of each lines. They cannot work by G98.
> >
> > I need some help. Is there a way to copy the files by ascii way (not
> > binary way).
> >
> > Thanks in advance
> >
> > Y. Fan
> >
> > --
> > =============================================================
> > Yubo Fan                         Email: yubofan@guomai.sh.cn
> > Organic Synthesis Lab
> > The Department of Chemistry
> > Fudan University                 Phone: 8621-65648139
> > No. 220 Handan Road              Fax:   8621-65641740
> > Shanghai, 200433
> > P. R. China
> > =============================================================
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> -----------------------------------------------
> Robert P. Krawczyk
> Lehrstuhl fuer Theoretische Chemie
> TU Muenchen
> Lichtenbergstr. 4
> 85747 Garching
>
> Tel.: +49 89 289 - 13618
> Fax.: +49 89 289 - 13622
> e-mail: robert.krawczyk@gmx.de
> -----------------------------------------------
>
> -= This is automatically added to each message by mailing script =-
> CHEMISTRY@ccl.net -- To Everybody    |   CHEMISTRY-REQUEST@ccl.net -- To Admins
> MAILSERV@ccl.net -- HELP CHEMISTRY or HELP SEARCH
> CHEMISTRY-SEARCH@ccl.net -- archive search    |    Gopher: gopher.ccl.net 70
> Ftp: ftp.ccl.net  |  WWW: http://www.ccl.net/chemistry/   | Jan: jkl@ccl.net



--

  Dr Mark J Forster Ph.D.
  Principal Scientist
  Informatics Laboratory
  National Institute for Biological Standards and Control
  Blanche Lane, South Mimms,
  Hertfordshire EN6 3QG, United Kingdom.

  Tel  +44 (0)1707 654753
  FAX  +44 (0)1707 646730
  E-mail  mforster@nibsc.ac.uk



