From: Chris F.A. Johnson on
On 2010-05-05, John Thompson wrote:
> On 2010-05-03, Bit Twister <BitTwister(a)mouse-potato.com> wrote:
>
>> On Mon, 03 May 2010 07:01:56 -0400, David Bernier wrote:
>>
>>> The following works when iterating "/bin/bash/" :
>>>
>>> [david(a)localhost ~]$ env|grep SHLVL
>
>> So does
>> echo "LEVEL=$SHLVL"
>
> Ok, so now how do you get that into your PROMPT string?

PS1='LEVEL=$SHLVL '


--
Chris F.A. Johnson, <http://cfajohnson.com>
Author:
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)