【发布时间】:2013-10-07 20:11:54
【问题描述】:
我有以下 KornShell (ksh) 脚本:
VAR='/this/is/a/path/'
DAT='01_01_2014'
cat << EOF
... what should I do here to concat variables with strings? ...
$VARfoldername$DAT
EOF
但是,这只是给我(因为变量 $VARfoldername 被评估,显然不存在):
01_01_2014
我需要将 $VAR 与另一个字符串连接,然后与 $DAT 连接,这样运行脚本会导致:
/this/is/a/path/foldername01_01_2014
【问题讨论】:
标签: string shell variables concatenation ksh