Created
June 17, 2014 14:30
-
-
Save kunpengku/2c76790cd8b7316765ef to your computer and use it in GitHub Desktop.
将一个命令的输出赋值给一个变量的两种方式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a=`ls -l` | |
| echo $a | |
| echo | |
| echo "$a" | |
| a=$(ls -l) | |
| echo $a | |
| echo | |
| echo "$a" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment