Is there a way to use unix date to print the number of seconds since an era?
date
I am open to using other standard shell commands if there is a way
(I use Solaris, so there is no date "+"%s" )
date "+"%s"
thanks
Well, since this is a programming site, I would just compile something like:
#include <stdio.h> #include <time.h> int main (void) { printf ("%d\n",time(0)); return 0; }
:-)
perl -e 'print time'
you can try nawk (but try doubling the confirmation with perl commands and see if they give the same results)
nawk "BEGIN{print srand}"
try it
/ usr / bin / truss / usr / bin / date 2> & 1 | grep ^ time | awk '{print $ 3}'
Source: https://habr.com/ru/post/1306236/More articles:What is the preferred accessible and semantically correct encoding method for this type of data? - cssCSS sprites navigation and User with image disabled - cssArchiva SMTP Real Domain Name Required for Sender Address Error - archivaWhy doesn't calling close () after fopen () close? - c ++Rails, use the contents of the file in the controller - ruby ββ| fooobar.comHtml Entity Code for ΕΎ - htmlHow to set a domain cookie domain in Rails3 - ruby ββ| fooobar.comCreating a universal iPad application - Where is the device recognition code? - iphoneSilverlight Dataform validation not working - c #Problem with char pointer function C, can anyone explain? - cAll Articles