plz help with ftp pc based files to a unix environment

plz help with ftp pc based files to a unix environment

Post by domTHEsto » Sun, 21 Mar 1999 04:00:00



Hi

I'm in uni and when I work at home, programming, after finishing code I ftp
these files to my
UNIX, system V release 4.0, on SunOS 5.5,  account to use their compiler,
MOCKA.  but the problem is that it has problems with the files.  It
complains and says that there is an invalid character at the end of the each
line!

when I look at the file in 'vi'  it reveals that at the end of each line
there is a ^M control character.

q1.  does anyone know what this control character does, is it something to
do with next line?

I can remove this control character and it compiles okay.

but the files I want to ftp are huge and rely on other file, i.e. DEFINITION
AND IMPLEMENTATION MODULES.

q2, can anyone tell me how to ftp files to unix without it inserting this
character, or how I can write them, on the PC using NOTEPAD, without
inserting the character?

q3, or does anyone have MOCKA for the PC?

I really hope someone can help me.

much greatness,
dom

 
 
 

plz help with ftp pc based files to a unix environment

Post by Ken Pizzi » Sun, 21 Mar 1999 04:00:00



>I'm in uni and when I work at home, programming, after finishing code I ftp
>these files to my
>UNIX, system V release 4.0, on SunOS 5.5,  account to use their compiler,
>MOCKA.  but the problem is that it has problems with the files.  It
>complains and says that there is an invalid character at the end of the each
>line!

>when I look at the file in 'vi'  it reveals that at the end of each line
>there is a ^M control character.

>q1.  does anyone know what this control character does, is it something to
>do with next line?

On DOS-ish systems, a newline is the two character sequence CR-NL,
but on Unix-ish systems it is simply the NL character.  The MOCKA (?)
compiler is being rather finiky in not simply ignoring the CR character.

Quote:>q2, can anyone tell me how to ftp files to unix without it inserting this
>character, or how I can write them, on the PC using NOTEPAD, without
>inserting the character?

Try setting up your ftp to transfer files in ASCII (rather than
binary/image) mode.  This should auto-translate the newlines
on-the-fly.

Alternatively, you could do something like:
   sed 's/.$//' <transferred_file >file_to_be_mocka\'d
on the Unix box after a binary transfer.

                --Ken Pizzini

 
 
 

1. plz help with ftp pc based files to a unix environment

Hi

I'm in uni and when I work at home, programming, after finishing code I ftp
these files to my
UNIX, system V release 4.0, on SunOS 5.5,  account to use their compiler,
MOCKA.  but the problem is that it has problems with the files.  It
complains and says that there is an invalid character at the end of the each
line!

when I look at the file in 'vi'  it reveals that at the end of each line
there is a ^M control character.

q1.  does anyone know what this control character does, is it something to
do with next line?

I can remove this control character and it compiles okay.

but the files I want to ftp are huge and rely on other file, i.e. DEFINITION
AND IMPLEMENTATION MODULES.

q2, can anyone tell me how to ftp files to unix without it inserting this
character, or how I can write them, on the PC using NOTEPAD, without
inserting the character?

q3, or does anyone have MOCKA for the PC?

I really hope someone can help me.

much greatness,
dom

2. linux won't install

3. RPC error

4. plz plz plz help.

5. XDM solution.

6. ethernet'ed PC lab as a Linux based C++ environment

7. kde-installation on debian distrib

8. pick script in The UNIX Programming Environment (The UNIX Programming Environment )

9. web base piranha help plz

10. mount PC files on UNIX using PC-NFS?

11. Help W/Unix Shell Script - File Splitting Based on Text String

12. Advice needed - UNIX/PC/TCP environment and Netware