Kamaraju S Kusumanchi:
> Inside a konsole running bash shell, If I do
> 
> $       # initial konsole prompt
> $ bash  # spawn a new shell
> $ bash  # spawn third shell
> $ bash  # spawn fourth shell
> 
> Now is there any command which tells that the current shell's "depth" is 4 
> as in it has three "parent shells"?

With bash, you can use $SHLVL. Apparently, dash doesn't support it so I
doubt that it is portable in any way.

J.
-- 
I wish I could achieve a 'just stepped out of the salon' look more
often. Or at least once.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature

_______________________________________________
D-community-offtopic mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic

Reply via email to