A shell is a text-based interface between the user and the OS, which is a command interpreter that accepts statements (commands) issued by the user through the keyboard, mouse or other devices. A typical multiuser system should provide commands to the tasks which excute and manage programs, manipulate files and obtain system information.
A shell could also be turned to a powerful programming language. This idea was pioneered in the UNIX OS. The following is the code of a simple shell script (OSP by Bic & Shaw) :
COUNT = 'who|wc -l'
if test $COUNT -lt 8
then echo $COUNT users logged in
else echo too many users
fi