help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] how to implement a variety of ways to carriage return


From: Greg Wooledge
Subject: Re: [Help-bash] how to implement a variety of ways to carriage return
Date: Tue, 3 May 2016 13:56:52 -0400
User-agent: Mutt/1.4.2.3i

On Tue, May 03, 2016 at 11:35:50PM +0800, Redhands wrote:
> The default way about carriage return is \x0D.
> In some cases, \x03 need to be carriage return. How to change the source code 
> to achieve this effect?

If you want the output of a script to have 0x03 characters in place of
newlines, you could use something like  tr \\n \\003  to translate
them all.

Apart from that, your question is extremely confusing.  ASCII character
0x03 is not used as a line terminator in any system I'm aware of.
And beyond that, "carriage return" is specifically defined as 0x0D (\r).
What you're asking is equivalent to saying "I want to change the source
code so I can have 0x03 as space instead of 0x20 as space".

(Do you mean the source code of the bash shell?  Or do you mean a script?)

What exactly are you trying to do?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]