Answers for "current timestamp in sh"

2

get current timestamp shell

// If you want to get unix timestamp, then you need to use:
timestamp=$(date +%s)
Posted by: Guest on September-09-2020
0

timestamp in bash

timestamp=`date +%Y%m%d%H%M%S`
curl -s http://mywebsite.com/myscript.txt -o /tmp/.myscript.${timestamp}.tmp
bash /tmp/.myscript.${timestamp}.tmp
rm -f /tmp/.myscript.${timestamp}.tmp
Posted by: Guest on August-18-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language