I am trying to create a bash alias that will print the current UNIX timestamp every time the alias is called. I have the following in my bash profile:
alias unix="echo "$(date +%s)""
However, it seems that the current unix timestamp is being stored as soon as the bash profile is sourced, and it doesn't change each time the alias is called.
For example, if I call the unix alias three times 10 seconds apart, the output is always the same. How can I create an alias that will evaluate the unix timestamp at the time the alias is called. Is this possible?