Quantcast
Channel: nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED)
Viewing all articles
Browse latest Browse all 2612

Bash Assign Output of Shell Command To VariablenixCraft Updated Tutorials/Posts

$
0
0

How do I assign the output of a shell command to a shell variable under Unix like operating system? For example, I want to store the date command output to a variable called $now. How do you do that? How can I set a variable to the output of a command in Bash?

The post Bash Assign Output of Shell Command To Variable appeared first on nixCraft.

Viewing all articles
Browse latest Browse all 2612

Trending Articles