Operating System - Tru64 Unix
1748092 Members
5502 Online
108758 Solutions
New Discussion юеВ

unable to set prompt

 
SOLVED
Go to solution
Abhishek Choudhary
New Member

unable to set prompt

i am unable to set prompt on a tru64 5.1b, by running the following command-

exec /usr/bin/env 'PS1=sAnScAn_Hp_PrOmPt#' /usr/bin/posix/sh -i

It should set to PS1 but no avail. whenever i type the command no output generated. not even any error message. I issued the command as follow and it seems like nothing happen.

# ditto:/ > exec /usr/bin/env 'PS1=sAnScAn_Hp_PrOmPt# '
/usr/bin/posix/sh -i
# ditto:/ > exec /usr/bin/env 'PS1=sAnScAn_Hp_PrOmPt#' /usr/bin/posix/sh -i # ditto:/ >

please help me out.
5 REPLIES 5
Steven Schweda
Honored Contributor
Solution

Re: unable to set prompt

> i am unable to set prompt on a tru64 5.1b,
> by running the following command-
> [...]

Are you trying to change the prompt, or
start a new shell, or both, or what?

What's wrong with something simple like:

PS1='prompt ' ; export PS1

?

Why are you working so hard?
Steven Schweda
Honored Contributor

Re: unable to set prompt

I can't get to a Tru64 system now, but on an
HP-UX system, a similar command seems to work
as expected:

dyi # exec env 'PS1=fred> ' bash
fred>

In fact:

dyi # exec /usr/bin/env 'PS1=sAnScAn_Hp_PrOmPt# ' /usr/bin/posix/sh -i
sAnScAn_Hp_PrOmPt#

Does "ps" or "printenv" (before and after)
tell you anything interesting?

If I spell "PS1" wrong, I can get a similar
effect:

dyi # exec env 'PSl=fred> ' bash
dyi #

dyi # printenv | grep PS
PS1=dyi #
PSl=fred>

(With the Forum font, they look very
similar.)

What happens if you set some other variables,
too?
Abhishek Choudhary
New Member

Re: unable to set prompt

Thanks Steve,

Actually i am on support for HPCC an hp product. this product opens a session to the host for a collection of data from that host. user is having k-shell. does it has to do anything with setting commands. i tried to reproduce the command exec /usr/bin/env 'PS1=sAnScAn_Hp_PrOmPt# '
/usr/bin/posix/sh -i
on my lab. it worked, but not working on the user machine. do you have any reason why this is so?
Steven Schweda
Honored Contributor

Re: unable to set prompt

> [...] do you have any reason why this is so?

No, and I'm days away from my Tru64 system.

> [...] on my lab. it worked, [...]

On what are you testing it?

(In the old days, I'd suggest trying one of
the HP TestDrive systems, but they flushed
Tru64 from that program long before they
flushed the whole program.)
Rob Leadbeater
Honored Contributor

Re: unable to set prompt

Hi,

I haven't got a 5.1B system to test on, but on a 4.0D system running on PersonalAlpha (www.personalalpha.com) things seem to work as expected:

# exec /usr/bin/env 'PS1=rob# ' /usr/bin/posix/sh -i
rob#

Cheers,

Rob