Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!uwvax!rutgers!caip!clyde!cbatt!ihnp4!popeye!sherm From: sherm@popeye.UUCP (Paul A. Sherman) Newsgroups: net.unix Subject: Re: KSH PSx won't quote exclamation points Message-ID: <31@popeye.UUCP> Date: Fri, 17-Oct-86 10:00:14 EDT Article-I.D.: popeye.31 Posted: Fri Oct 17 10:00:14 1986 Date-Received: Sat, 18-Oct-86 23:03:24 EDT References: <3957@amdahl.UUCP> Reply-To: sherm@popeye.UUCP (Paul A. Sherman) Organization: AT&T-IS Labs, Lincroft, NJ Lines: 31 Keywords: PS1, PS2, PS3 Summary: Use two exclamation points In article <3957@amdahl.UUCP> krs@amdahl.UUCP (Kris Stephens) writes: >In the Korn Shell (ksh), I'm trying to set my PS1 to include my system- >name and userid as amdahl!krs and no matter how I quote the >exclamation, it gets interpreted as the command process number. I even >tried saving the desired string in another variable and just including >the variable in the PS description. Samples: ... Several tries with different types of quotes ... >How can I get a real printable exclamation into a Prompt String???? I thought that there must be a way to do this, but when I tried lots of variations (in addition to the ones Kris tried) I still came up empty. Therefore I checked out the source to ksh and voila! I found the answer. The way to get a "!" in a prompt string is to put two of them in. The command: PS1="popeye!!sherm" leads to the prompt "popeye!sherm". This works on the most recent version of ksh (06/03/86) but the source as far back as 06/84 indicates it was treated the same way. Unfortunately I have found no indication of this in any ksh documentation. I am posting this followup rather than replying directly to Kris since I think others may be interested too (if only for curiosity's sake). -- Paul Sherman AT&T Information Systems, Lincroft, NJ {pegasus|ihnp4}!popeye!sherm (201) 576-6316