answersLogoWhite

0

A shell variable is a temporary location in memory that can be used to store and retrieve information.

For example, the following creates a shell variable and then prints it out:

stuff="Hi there"

echo $stuff

will echo out 'Hi There' to the screen. It has the words "Hi There" saved in a memory location called $stuff, which can be retrieved by its name.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Explain different types of variables in shell?

Environment Variables: Sometimes called special shell variables, keyword variables, predefined shell variables, or standard shell variables, they are used to tailor the operating environment to suit your needs. Examples include PATH, TERM, HOME, and MAIL.User-defined Variables: These are variables that you create yourself.Positional Parameters: These are used by the shell to store the values of command-line arguments


What are the common shell variables in unix?

The common shell variables differ according to which shell you are talking about. In general, they control the shell environment behavior, terminal behavior, and other external things. You can get a list per shell by using the 'man' command with the shell name to list out the common variables used in that shell environment.


How do you write a script which lists the 10 Shell System variables?

You don't need a shell script to do that. Since you don't say what 10 shell variables you want, you can list them all by using the 'set' command to list all known in-use shell variables in the current session.


What are different types of shell variable?

In shell scripting, there are several types of variables: Environment Variables: These are global variables available to all processes and typically define system-wide settings (e.g., PATH, HOME). Shell Variables: These are local to the shell instance and can be used within scripts or interactive sessions (e.g., myvar="Hello"). Special Variables: These are predefined variables that hold specific information, such as $? (exit status of the last command) or $$ (process ID of the current shell). These variable types help manage data and control the behavior of shell scripts effectively.


Can you give an example of array using character variable in c program?

the example of array over charcter variables is char ["string"]


What is an Example of two independent variables?

Variables are symbols that replace unknown numbers. Variables are often letters. For example: 5*x=10 7*6=y Here "x" and "y" are the variables.


Give an example of set of shell commands that will give you the number of files in a directory?

For Unix, try the following: ls -1 | grep -v '^\.' | wc -l


what is 4x +7c?

I don't have the value of the variables, so I'm going to give you an example. Example: If x=3 and c=5 4(3)+7(5) 12+35=47.


A snail's shell is a example of?

It is a good example of an exoskeleton.


Can you give me a sentence for variables?

Weather-modeling software must account for many variables.


Why k shell has low energy than valence shell?

AnswerK-shell electrons generally have much larger binding energies than valence shell electrons. Can you give me a specific example or some more information to clarify your question? is energy level depend on electrons, i means is the shell having more electrons have more energy?


What is a mini shell program used for in Unix?

The mini shell program is used in Unix as a programming software. It is a redirected and streamlined approach at creating variables, commands, and tokens.