home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!swolfson
- From: swolfson@nyx.cs.du.edu (Sabina Wolfson)
- Subject: Question about ' " ` (sorry if reposted)
- Message-ID: <1992Jul27.235121.26287@mnemosyne.cs.du.edu>
- X-Disclaimer: Nyx is a public access Unix system run by the University
- of Denver for the Denver community. The University has neither
- control over nor responsibility for the opinions of users.
- Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
- Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
- Date: Mon, 27 Jul 92 23:51:21 GMT
- Lines: 29
-
-
- Hi - I have a "basic" question about quotes. Let me explain what I am
- trying to do. (I'm using a ksh version from 88)
-
-
- I had PS1 defined like this and it worked fine:
-
- PS1="`/usr/5bin/tput bold`(`hostname`) `/usr/5bin/tput rmso`"
-
- Then I saw this cool PS1 in the "KornShell Programming Tutorial" (great
- book by Barry Rosenberg) that I wanted to use:
-
- PS1='${PWD#$HOME/} '
-
- The only way I could get PS1 to show both the modified PWD and the
- hostname in bold was to do this (with a little help):
-
- TEMP_FRONT="`/usr/5bin/tput bold`"
- TEMP_BACK="(`hostname`) `/usr/5bin/tput rmso`"
- PS1='${TEMP_FRONT} ${PWD#$HOME/} ${TEMP_BACK}'
-
- I would like to be able to do this all in one line but I cannot get the
- quotes right...anyone know how to do this?
-
- Thanks,
- Sabina
-
- sabina@cns.nyu.edu
-
-