Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: ftp ascii instead of bin??
  1998-08-27  4:00 ftp ascii instead of bin?? Mario Zimmermann
@ 1998-08-27  4:00 ` Stefan Heim
  1998-08-30  4:00   ` Charles M Richmond
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Heim @ 1998-08-27  4:00 UTC (permalink / raw)


Mario Zimmermann <mzi2sn@sn0967.sn.bosch.de> wrote:
>i have a file, which was transmitted using ftp.
>The problem is, that the file was transmitted unsing ascii instead of
>binary mode.
>How can i change this file to the original format?
[...]
>The transmission was between two Digital Unix 4.0d systems.

AFAIK it doesn't matter whether you transfer as binary or ascii between two
UN*X systems.

If I'm wrong and any CR LF -> LF translation has been done, you still would
not be able to reconstruct the original file, for you wouldn't know whether
a LF would have to be "retranslated" (replaced by CR LF) or not.

HTH,
-Stefan

-- 
Stefan Heim   <sheim@gwdg.de>  <sheim@goe.net> 
Max Planck Institute for Biophysical Chemistry
37070 Goettingen, Germany
Voice: +49 551 201-1065  Fax: +49 551 201-1011



^ permalink raw reply	[flat|nested] 3+ messages in thread

* ftp ascii instead of bin??
@ 1998-08-27  4:00 Mario Zimmermann
  1998-08-27  4:00 ` Stefan Heim
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Zimmermann @ 1998-08-27  4:00 UTC (permalink / raw)


Hello

i have a file, which was transmitted using ftp.
The problem is, that the file was transmitted unsing ascii instead of
binary mode.
How can i change this file to the original format?
I tried tools like flip (dos2unix) or the following shell script:

#! /bin/ksh
# convert dos files to Unix by removing carriage returns.
for f in $@
do
        tr -d '\015' <$f >${f}+ && mv -i $f ${f}~ && mv -i ${f}+ $f
done

The transmission was between two Digital Unix 4.0d systems.
Thanks for your help.

Mario

e-mail:	mario.zimmermann@pcm.bosch.de



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ftp ascii instead of bin??
  1998-08-27  4:00 ` Stefan Heim
@ 1998-08-30  4:00   ` Charles M Richmond
  0 siblings, 0 replies; 3+ messages in thread
From: Charles M Richmond @ 1998-08-30  4:00 UTC (permalink / raw)


Stefan Heim wrote:
> 
> Mario Zimmermann <mzi2sn@sn0967.sn.bosch.de> wrote:
> >i have a file, which was transmitted using ftp.
> >The problem is, that the file was transmitted unsing ascii instead of
> >binary mode.
> >How can i change this file to the original format?
> [...]
> >The transmission was between two Digital Unix 4.0d systems.
> 
> AFAIK it doesn't matter whether you transfer as binary or ascii between two
> UN*X systems.
> 
> If I'm wrong 

You are )-:

> and any CR LF -> LF translation has been done, you still would
> not be able to reconstruct the original file, for you wouldn't know whether
> a LF would have to be "retranslated" (replaced by CR LF) or not.
> 

Thats right (-:

-- 
***********************************************************************
*  Charles Richmond    Integrated International Systems Corporation   *
*  cmr@iisc.com        cmr@koibito.iisc.com  cmr@shore.net            *
*  UNIX Internals, I18N, L10N, X, Realtime Imaging, and  Custom S/W   *
*  One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431      *
*  (617) 723 7695    (617) 367 3151        FAX (617) 723 6861         *
***********************************************************************



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-08-30  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-08-27  4:00 ftp ascii instead of bin?? Mario Zimmermann
1998-08-27  4:00 ` Stefan Heim
1998-08-30  4:00   ` Charles M Richmond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox