#!/bin/bashK1=WELCOMETOBEIJING
echo$K1K2="WELCOME TO BEIJING"echo$K2
K3="WELCOME TO HENAN"echo$K3K4="HI $K2"echo$K4K5="HELLO $K3 HAVE FUN"echo$K5K6="${K1}HEVE A GOOD TIME"echo$K6K7=$K1echo$K7unset K1
K8=$K1echo$K8
运行结果:
WELCOMETOBEIJING
WELCOME TO BEIJING
WELCOME TO HENAN
HI WELCOME TO BEIJING
HELLO WELCOME TO HENAN HAVE FUN
WELCOMETOBEIJINGHEVE A GOOD TIME
WELCOMETOBEIJING