This is a discussion on Find the nested Shell level? within the Shell scripting forums, part of the Development/Scripting category; Hello, Could someone let me know how do I find out what level of shell am I into? I use ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hello,
Could someone let me know how do I find out what level of shell am I into? I use to switch between one shell to other frequently in my Linux session but I forgot what level I'm in. Entering the "exit" command sometimes leaves the session sometimes takes me to the previously running shell. Thanks, Hem |
| Sponsored Links | ||
|
|
|
||||
|
Use SHLVL variable under bash - it incremented by one each time an instance of bash is started.
Code:
echo $SHLVL Code:
bash echo $SHLVL
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find subdomains in url | nvbhole | Shell scripting | 2 | 12-22-2007 01:12 PM |
| writing a shell script to find out my shell name | jaymob123 | Shell scripting | 1 | 10-08-2007 01:36 AM |
| find out what chip nic | Linux software | 1 | 01-30-2006 05:06 PM | |
| linux changing run level | Linux software | 1 | 01-10-2006 07:25 PM | |
| Different Level of graph | rafiq380 | Linux software | 1 | 12-23-2005 06:33 PM |