How do you store a value in a variable in UNIX?

How do you store a value in a variable in UNIX?
Answer
To store the output of a command in a variable, you can use the shell command substitution feature in the forms below: variable_name=$(command) variable_name=$(command [option …] arg1 arg2 …) OR variable_name=’command’ variable_name=’command [option …]
 

Tìm kiếm

Back
Top