What is the command for " how many shell is running in your
system or how many shell supported by your system " ?.

Answers were Sorted based on User's Feedback



What is the command for " how many shell is running in your system or how many shell supporte..

Answer / sandeep jaiswal

how many shell supported by your system

check the file /etc/shells

Is This Answer Correct ?    9 Yes 1 No

What is the command for " how many shell is running in your system or how many shell supporte..

Answer / joker

> ps -a |grep -E 'sh$' |wc -l

-a is for to list process of all users
-E extended grep to filter the shells (since they end with sh like bash, tcsh, ksh, sh
-$ to match only at the end of the line where the process is printed

Is This Answer Correct ?    0 Yes 1 No

What is the command for " how many shell is running in your system or how many shell supporte..

Answer / nayakss

ps| grep -E "*shh*" | wc -l

This gives the no of shell currently running.
Though this answer is correct but I don't think this is the
right approach.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Shell Script Interview Questions

write a shell script to find the largest number from 3 given numbers.

6 Answers  


How can you get the value of pi till a 100 decimal places?

0 Answers  


How to print all array elements and their respective indexes?

0 Answers  


What are scripts in psychology?

0 Answers  


Suppose you execute a command using exec, what will be the status of your current process in the shell?

0 Answers  






Given a file find the count of lines containing the word "abc".

0 Answers  


What are zombie processes?

0 Answers  


Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.

2 Answers   IBM, TCS,


How to change our default shell?

5 Answers  


Explain about gui scripting?

0 Answers  


write a shell script to identify the given string is palindrome or not?

17 Answers   CTS, HP, IBM, InfoEst, Wipro,


What is INODE?

2 Answers  


Categories