如何创建具有如下文件名格式的变量:文件名模式:SnapshotIR__somenumber.csv
我尝试了类似的东西:
TODAY=$(date +"%m%d%Y")
SNAPSHOT = $(SnapshotIR$TODAY*.csv)
我收到如下错误:
test.sh: line 2: SnapshotIR02122013_2239.csv: command not found
test.sh: line 2: SNAPSHOT: command not found
所以,当我想使用 if
if [ -f SnapshotIR$TODAY*.csv] -> works
if [ -f ${SNAPSHOT} ] -> does not work (I get the above error)