ksh: (Null character) Set mark

ksh: (Null character) Set mark

am 29.01.2008 21:15:14 von Pyt

Hello,
I found that ksh is putting a ^@ in front of every line in the
..sh_history. I think ^@ is called (Null character) Set mark.
Whats the use?

Re: ksh: (Null character) Set mark

am 29.01.2008 21:24:53 von Bill Marcum

On 2008-01-29, Pyt T. wrote:
>
>
> Hello,
> I found that ksh is putting a ^@ in front of every line in the
> .sh_history. I think ^@ is called (Null character) Set mark.
> Whats the use?

Maybe to mark the beginning of a command, since commands can take more
than one line.

Re: ksh: (Null character) Set mark

am 29.01.2008 21:30:31 von Janis Papanagnou

Pyt T. wrote:
> Hello,
> I found that ksh is putting a ^@ in front of every line in the
> .sh_history. I think ^@ is called (Null character) Set mark.
> Whats the use?

My guess is, it's to separate commands (simple and multi-line).

Janis

Re: ksh: (Null character) Set mark

am 30.01.2008 06:30:30 von Barry Margolin

In article ,
"Pyt T." wrote:

> Hello,
> I found that ksh is putting a ^@ in front of every line in the
> .sh_history. I think ^@ is called (Null character) Set mark.
> Whats the use?

What character do you suggest it use instead? It needs to be a
character that can't be part of a command.

BTW "set mark" is only what this keystroke does in Emacs, it's not more
generally associated with the cahracter.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

Re: ksh: (Null character) Set mark

am 30.01.2008 09:37:11 von Stephane CHAZELAS

On Wed, 30 Jan 2008 00:30:30 -0500, Barry Margolin wrote:
> In article ,
> "Pyt T." wrote:
>
>> Hello,
>> I found that ksh is putting a ^@ in front of every line in the
>> .sh_history. I think ^@ is called (Null character) Set mark.
>> Whats the use?
>
> What character do you suggest it use instead? It needs to be a
> character that can't be part of a command.
[...]

It could have used a quoting mechanism as other shells do, so
that the history file remains a text file and can be processed
by text utilities like grep/awk...

--
Stephane