I have a tool which requires the time in hex format.
Suppose if date -d "Thu Sep 15 09:13:05 UTC 2011" +%s -u gives the time in seconds as 1316077985, the hex value of 1316077985 which is 4E71C1A1 should be found and it should be given as input to the tool as
/usr/bin/mytool 0xA1 0xC1 0x71 0x4E.
How can do this in shell script if the time in seconds is available as input?
Something like this should work for you: