http://zetawiki.com/wiki/Bash_%EC%8B%A4%ED%96%89%EA%B2%B0%EA%B3%BC%EB%A5%BC_%EB%B3%80%EC%88%98%EC%97%90_%EB%8B%B4%EA%B8%B0
변수명=`명령어`
변수명=$(명령어)
[root@zetawiki ~]# whoami
root
[root@zetawiki ~]# STR1=`whoami`
[root@zetawiki ~]# echo $STR1
root
[root@zetawiki ~]# STR2=$(whoami)
[root@zetawiki ~]# echo $STR2
root
[root@zetawiki ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
27678892 18857392 7392816 72% /
/dev/xvda1 101086 36768 59099 39% /boot
tmpfs 524288 0 524288 0% /dev/shm
[root@zetawiki ~]# STR3=`df`
[root@zetawiki ~]# echo $STR3
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 27678892 18857392 7392816 72% / /dev/xvda1 101086 36768 59099 39% /boot tmpfs 524288 0 524288 0% /dev/shm
[root@zetawiki ~]# echo "$STR3"
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
27678892 18857392 7392816 72% /
/dev/xvda1 101086 36768 59099 39% /boot
tmpfs 524288 0 524288 0% /dev/shm
Designed by sketchbooks.co.kr / sketchbook5 board skin
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5
Sketchbook5, 스케치북5