You can get curent datetime in Linux bash shell with commands as following:
Then in the bash shell file you can print current datetime with echo command like below:
echo "Current date: $now"
The final example looks like this:
#!/bin/bash now=`date` echo "[$now]Setting environment parameter ..."