I\'m trying to concat a var (date) and string to have a file with current date name.
My code.
days=\"$(date +\"%Y%m%d_%H%M\")\" echo \"SKIP\" > ${
It works on my system (OS X) even with double quotes everywhere. For variation I used:
$> days="$(date +'%Y%m%d_%H%M')" $> echo $days 20160601_1051 $> echo "SKIP" > ${days}_EMERGENCY.txt $> ll ${days}_EMERGENCY.txt -rw-r--r-- 1 user team 5 Jun 1 10:52 20160601_1051_EMERGENCY.txt