ksh: (Null character) Set mark

Hello,
I found that ksh is putting a ^ [at] in front of every line in the
..sh_history. I think ^ [at] is called (Null character) Set mark.
Whats the use?
Pyt [ Di, 29 Januar 2008 21:15 ] [ ID #1918708 ]

Re: ksh: (Null character) Set mark

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

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

Janis
Janis Papanagnou [ Di, 29 Januar 2008 21:30 ] [ ID #1918709 ]

Re: ksh: (Null character) Set mark

On 2008-01-29, Pyt T. <pyt [at] upcmail.nl.invalid> wrote:
>
>
> Hello,
> I found that ksh is putting a ^ [at] in front of every line in the
> .sh_history. I think ^ [at] 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.
Bill Marcum [ Di, 29 Januar 2008 21:24 ] [ ID #1918710 ]

Re: ksh: (Null character) Set mark

In article <af34d$479f8952$5038ce7d$19582 [at] news.chello.nl>,
"Pyt T." <pyt [at] upcmail.nl.invalid> wrote:

> Hello,
> I found that ksh is putting a ^ [at] in front of every line in the
> .sh_history. I think ^ [at] 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 [at] 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 ***
Barry Margolin [ Mi, 30 Januar 2008 06:30 ] [ ID #1919731 ]

Re: ksh: (Null character) Set mark

On Wed, 30 Jan 2008 00:30:30 -0500, Barry Margolin wrote:
> In article <af34d$479f8952$5038ce7d$19582 [at] news.chello.nl>,
> "Pyt T." <pyt [at] upcmail.nl.invalid> wrote:
>
>> Hello,
>> I found that ksh is putting a ^ [at] in front of every line in the
>> .sh_history. I think ^ [at] 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
Stephane CHAZELAS [ Mi, 30 Januar 2008 09:37 ] [ ID #1919734 ]
Linux » comp.unix.shell » ksh: (Null character) Set mark

Vorheriges Thema: parsing a string based on a character
Nächstes Thema: How to run a script when no keyboard or mouse activity