[comp.sys.hp] ksh

jand@maestro.htsa.aha.nl (Jan Derriks) (02/26/91)

In article <KITANO.91Feb25205440@corn.pa.yokogawa.co.jp> kitano@corn.pa.yokogawa.co.jp (Kinichi Kitano) writes:
-
-I put a script in my .profile (from the book The Kornshell)
-
-$ cat .profile
-.
-.
-export SECONDS="$(date '+3600*%H+60*%M+%S')"
-typeset -z2 _h _m
-_hh="(SECONDS/3600)%24" _mm="(SECONDS/60)%60"
-_time='${_x[(_m=_mm)==(_h=_hh)]}$_h:$_m'
-PS1="$(hostname) $_time "'[!] '
-
-(This script prints the time of day.)
-
-And when I sourced my profile ( . .profile ), terminal hung.
-This happend at every HP's (HP9000/800, HP9000/400. HP9000/300 from
-$Revision: 56.4 to $Revision: 64.38.1.14 $ )
-
-What is the problem?

I think your PS1 exceeds the length in COLUMNS. We had this problem
some time ago when my collegue tried a fancy way to set COLUMNS and
LINES.

Try this and ksh hangs:
	 export COLUMNS PS1
	 PS1='waaaaaayyyyy toooo loooongggg > '
	 COLUMNS=10

I didn't get your script to work yet, but I have a strong suggestion
the PS1 exceeds COLUMNS columns... 
Does anyone know if this is a known bug in ksh ?

Jan Derriks   

PS: can anyone please fix the bugs in the 'MODEM DTR question' thread ?
    (I'm still waiting...)
-- 

A chubby man with a white beard and a red suit will approach you soon.
Avoid him.  He's a Commie.