0% found this document useful (0 votes)
37 views1 page

Shell Prompt: $date Thu Jun 25 08:30:19 MST 2009

A shell is an interface that allows users to run programs and scripts by taking input from the user, executing the requested commands, and displaying outputs. There are different types of shells that have their own commands and functions, such as the Bourne shell and C shell which use $ and % as their default prompts respectively. The shell prompt awaits user input, executes the first word as a command, separates arguments with spaces and tabs, and displays results after running programs like the date command example.

Uploaded by

rahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

Shell Prompt: $date Thu Jun 25 08:30:19 MST 2009

A shell is an interface that allows users to run programs and scripts by taking input from the user, executing the requested commands, and displaying outputs. There are different types of shells that have their own commands and functions, such as the Bourne shell and C shell which use $ and % as their default prompts respectively. The shell prompt awaits user input, executes the first word as a command, separates arguments with spaces and tabs, and displays results after running programs like the date command example.

Uploaded by

rahul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

A Shell provides you with an interface to the Unix system.

It gathers input from you


and executes programs based on that input. When a program finishes executing, it
displays that program's output.
Shell is an environment in which we can run our commands, programs, and shell
scripts. There are different flavors of a shell, just as there are different flavors of
operating systems. Each flavor of shell has its own set of recognized commands
and functions.

Shell Prompt
The prompt, $, which is called the command prompt, is issued by the shell. While
the prompt is displayed, you can type a command.
Shell reads your input after you press Enter. It determines the command you want
executed by looking at the first word of your input. A word is an unbroken set of
characters. Spaces and tabs separate words.
Following is a simple example of the date command, which displays the current
date and time −
$date
Thu Jun 25 08:30:19 MST 2009
You can customize your command prompt using the environment variable PS1
explained in the Environment tutorial.

Shell Types
In Unix, there are two major types of shells −
 Bourne shell − If you are using a Bourne-type shell, the $ character is the
default prompt.
 C shell − If you are using a C-type shell, the % character is the default
prompt.

You might also like