1825805 Members
2206 Online
109688 Solutions
New Discussion

How to input ^M in ex?

 
SOLVED
Go to solution
Thomas king
New Member

How to input ^M in ex?

Hi All,
I find that I can't input ^M as a character in ex , when I press ^V^M, ex treat it as a linefeed.
But I can input ^M as a character in vi and ex in aix 5.2.
My environment is HP 11.i .
Please help me .
Thanks in advance!
Thomas.
6 REPLIES 6
Elmar P. Kolkman
Honored Contributor
Solution

Re: How to input ^M in ex?

I've tried it in vi on HP-UX (11 and 11i)and it works...
VM

Only ex doesn't support it, it seems. Any particular reason you want to use ex instead of vi?
Every problem has at least one solution. Only some solutions are harder to find.
Steven E. Protter
Exalted Contributor

Re: How to input ^M in ex?

This happens when a file that was meant to be transferred to a system ascii is transferred binary.

Check the ftp settings binary/ascii when doing the transfers.

Microsoft's built in ftp client defaults to ascii, that can be a problem.

For reasons I do not understand secure ftp sftp does not have this problem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeroen Peereboom
Honored Contributor

Re: How to input ^M in ex?

Steven

does secure ftp support ascii and binary at all? I could not find the sub-commands to set the transfer mode, and I think it's always binary.

JP.
Thomas king
New Member

Re: How to input ^M in ex?

Thank you for all your replies.

Yes , I know I can input it in vi. But I am very
strange why it doesn't work in ex.

Best regards.
Elmar P. Kolkman
Honored Contributor

Re: How to input ^M in ex?

It's even stranger: have you tried in ex to apend ^V^M, stop appending, save the file and then cat the file with 'cat -v'?
You'll see that the ^V is in the file...

ex just doesn't support the escaping of control characters...
Every problem has at least one solution. Only some solutions are harder to find.
Thomas king
New Member

Re: How to input ^M in ex?

Yes, I have found that before I post this message.
Thank you all!

Best regards