date.sh
#!/bin/bash
echo "The number of days since the year's beginning is $(date +%j)."
echo "The number of seconds elapsed since 01/01/1970 is $(date +%s)."
prefix=temp
suffix=$(date +%s)
filename=$prefix.$suffix
echo $filename
exit 0
验证
[root@kibana ~]# sh date.sh
The number of days since the year's beginning is 288.
The number of seconds elapsed since 01/01/1970 is 1728889325.
temp.1728889325
[root@kibana ~]#