Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!weyrich!orville From: orville@weyrich.UUCP (Orville R. Weyrich) Newsgroups: comp.unix.sysv386 Subject: Fortune Cookie Prompt Message-ID: <1991Jun10.003223.3384@weyrich.UUCP> Date: 10 Jun 91 00:32:23 GMT Organization: Weyrich Computer Consulting Lines: 30 I would like to set up a fortune-cookie type of program which displays a new randomly selected message each time my shell prompts me. It seems that I saw some description in a OLD FAQ list about how to include the "working directory" in the prompt, but I have lost that FAQ list. I understand that the solution to my problem is going to be system-dependent. My system is Microport Unix System V/386 revision 3. I normally use the Bourne shell, but if it would help, could change to the csh or ksh distributed with my system. As a last resort, I have considered placing a directory at the beginning of my search path which redefines all my system and user commands to invoke the normal command followed by the cookie program. This solution is not very elegant, will mess up i/o redirection, would produce multiple cookies when I use pipes, and is possibly a security hole. [I can minimize the problem with the i/o redirection by having the cookie program use stderr]. By the way, I'd like to do the same thing with MS-DOS. Any suggestions? [I used to know how to do it with CP/M, but have put my CP/M documentation into deep storage]. -------------------------------------- ****************************** Orville R. Weyrich, Jr., Ph.D. Certified Systems Professional Internet: orville%weyrich@uunet.uu.net Weyrich Computer Consulting Voice: (602) 391-0821 POB 5782, Scottsdale, AZ 85261 Fax: (602) 391-0023 (Yes! I'm available) -------------------------------------- ******************************