Skip to Content.
Sympa Menu

baslinux - Re: [BL] shell scripting

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] shell scripting
  • Date: Sat, 8 Jan 2005 04:47:45 +0000 (UTC)


Ksh (netBSD) to set the prompt to current working directory followed by a space and >
add or change in .profile (or profile for system-wide?)
PS1=['${PWD#{PWD%/*/*/*}/ >'

/arp/k/e/keesan/ > (or something very similar)

I got this by selectively removing a bit at a time of the similar line in there for setting it to show previous command number plus current working directory (pwd).

I will read about what the ['$ does unless someone wants to explain.
And the */*/* - my prompt can show at least 6 levels of directories so it is not to specify that, as I first thought.

Bash is said to be better for regular command-line use and ksh is more for programmers' use, and bash is later than csh, says one website.

The bash prompt is simpler. /w to show pwd.

keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Archive powered by MHonArc 2.6.24.

Top of Page