Author Topic: ^J - Unix  (Read 2181 times)

ABlipInContinuity

^J - Unix
« on: 07 October, 2008, 12:42:08 pm »
Hi,

I FTP'ed a bunch of very similar Unix shell scripts from 'doze to HPUX.
Now, I've seen files FTP'ed with ^M at the end of each line because I've used the wrong transfer mode before.

But on some lines, I have the ^J demarking the end of the line.

The files were editted using Notepad++ prior to transfer, using Unix ANSI encoding. Only one of the files I editted and transferred is affected.

Any thoughts please.

Incidentally, these symbols cannot be seen in vi, but when I try and execute the shell script the error output displays them.

Quote
./bmra_8F025_install.ksh[266]: pkg_bmr_syswarn_load.sql^J^JNEW_PACKAGE_FILES=pkg_etso_vista_email_hdr.sql:  not found
./bmra_8F025_install.ksh[305]: pkg_etso_vista_email_body.sql^J^JDB_TRIGGERS=cre_pf_bi_ber_trg.sql^J^JNEW_DB_TRIGGERS=^JPACKAGES_TO_DROP=^J^J# V1.10 Files listed here will end up in database/tables and be run against the database.^J# Typically pxa_.sql files. Note there is only a NEW_ version of this variable. My definition each drop (and hence change script)^J# has a unique compontnet in its name^JNEW_DB_ALTER_SCHEMA_FILES=^J^J# V1.10 Files listed here will end up in database/tables and NOT run against the database.^J# Typically used to get the pxa backout files into the dir. Note there is only...

ABlipInContinuity

Re: ^J - Unix
« Reply #1 on: 07 October, 2008, 12:46:30 pm »
Nothing to do with FTP.

I'd dropped a quote!

A PICNIC moment.

Zipperhead

  • The cyclist formerly known as Big Helga
Re: ^J - Unix
« Reply #2 on: 07 October, 2008, 01:25:13 pm »
Incidentally, these symbols cannot be seen in vi, but when I try and execute the shell script the error output displays them.

:set list

is useful for showing such stuff
Won't somebody think of the hamsters!

Re: ^J - Unix
« Reply #3 on: 07 October, 2008, 02:07:24 pm »
The files were editted using Notepad++ prior to transfer, using Unix ANSI encoding.

Are you sure it was ANSI encoding? I'd expect this behaviour if the file had been saved as UTF-16 (which many Windows files actually are).
"Yes please" said Squirrel "biscuits are our favourite things."

D0m1n1c Burford

Re: ^J - Unix
« Reply #4 on: 11 October, 2008, 08:33:36 pm »
Make sure you are sending the files using ASCII by typing:

ascii

at the FTP command prompt.

Re: ^J - Unix
« Reply #5 on: 12 October, 2008, 02:12:25 pm »
Make sure you are sending the files using ASCII by typing:

ascii

at the FTP command prompt.

^M end of line characters - Win to Unix FTP

It's nothing to do with ascii/bin mode within FTP.

That only removes/inserts Carriage Return (^M) characters alongside linefeed characters (^J). It leaves linefeed characters (^J) alone and doesn't insert/remove any of them.
"Yes please" said Squirrel "biscuits are our favourite things."