Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ukma!rex!samsung!spool.mu.edu!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.unix.internals Subject: Re: How do I ... (NOT a FAQ) Message-ID: <124818@uunet.UU.NET> Date: 6 Mar 91 20:28:10 GMT References: <668118083.19530@mindcraft.com> <506@bria> <1991Mar6.164033.8173@athena.mit.edu> Distribution: usa Organization: UUNET Communications Services, Falls Church, VA Lines: 14 >How do I get the current time into my command line prompt? If you use tcsh, "%t" expands to the current time. My prompt is "%t %d %S[rbj@%m %h]%s ", which expands to "3:03pm /home/rbj [rbj@uunet 2] " withe the stuff in brackets in reverse video. >The answer is: it depends. Some shells allow for the execution of embedded >commands in a prompt; the Big Three (sh, csh, ksh) do not. Tsk Tsk. Page 79 of the KornShell book tells how to do this. I just typed it in and it works. -- [rbj@uunet 1] stty sane unknown mode: sane