經安全檢測,此網站為安全網站,請放心前往原始網址!

Bash: Assign Output of Shell Command To Variable

H ow 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? You need to use command substitution feature of bash.

www.cyberciti.biz

網址安全性掃描由 google 提供