$ date +"FORMAT"
now=$(date +"%Y-%m-%d-%S") filename="my_program.$now.log" # example filename: my_program.2012-01-23-47.log
now=$(date +"%Y.%m.%d.%S.%N") filename="my_program.$now.log" # example filename: my_program.2013.01.23.44.364617000.log
now=$(date +"%s") filename="my_program.$now.log" # example filename: my_program.1358995092.log