Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-15 Thread Dr. David Kirkby
John Cremona wrote: >> I must admit I'm puzzled it needed the .sh on the end. Are you sure you had >> the >> execute permission on the version without the .sh ? > > Yes, definitely. (If not, even ./unixtime.sh would have failed.) Fair enough. I don't know much about dash, but I know if you pro

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-14 Thread John Cremona
2009/12/14 Dr. David Kirkby : > John Cremona wrote: >> On a 64-bit ubuntu system I had to include the ".sh" like this: >> >> j...@selmer%date -u +%s && ./unixtime.sh >> 1260823644 >> 1260823644 >> >> since: >> >> j...@selmer%date -u +%s && ./unixtime >> 1260823676 >> -bash: ./unixtime: No such file

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-14 Thread Dr. David Kirkby
John Cremona wrote: > On a 64-bit ubuntu system I had to include the ".sh" like this: > > j...@selmer%date -u +%s && ./unixtime.sh > 1260823644 > 1260823644 > > since: > > j...@selmer%date -u +%s && ./unixtime > 1260823676 > -bash: ./unixtime: No such file or directory > > My $SHELL is /bin/bas

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-14 Thread John Cremona
On a 64-bit ubuntu system I had to include the ".sh" like this: j...@selmer%date -u +%s && ./unixtime.sh 1260823644 1260823644 since: j...@selmer%date -u +%s && ./unixtime 1260823676 -bash: ./unixtime: No such file or directory My $SHELL is /bin/bash but your script uses /bin/sh which here is

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-14 Thread William Stein
On Sun, Dec 13, 2009 at 11:01 PM, Peter Jeremy wrote: > On 2009-Dec-13 16:27:41 +, "Dr. David Kirkby" > wrote: >>If you have a system with the GNU version of date, then >> >>date -u +%s >> >>will give the seconds since the Epoch. Unfortunately, it only works with GNU >>date, and so will not

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-13 Thread Peter Jeremy
On 2009-Dec-13 16:27:41 +, "Dr. David Kirkby" wrote: >If you have a system with the GNU version of date, then > >date -u +%s > >will give the seconds since the Epoch. Unfortunately, it only works with GNU >date, and so will not work on Solaris, HP-UX or no doubt many other Unix >systems. F

Re: [sage-devel] Please check if this computes seconds since Epoch

2009-12-13 Thread Dr. David Kirkby
Dr. David Kirkby wrote: > If you have a system with the GNU version of date, then > > date -u +%s > > will give the seconds since the Epoch. Unfortunately, it only works with GNU > date, and so will not work on Solaris, HP-UX or no doubt many other Unix > systems. > > The following script shou

[sage-devel] Please check if this computes seconds since Epoch

2009-12-13 Thread Dr. David Kirkby
If you have a system with the GNU version of date, then date -u +%s will give the seconds since the Epoch. Unfortunately, it only works with GNU date, and so will not work on Solaris, HP-UX or no doubt many other Unix systems. The following script should compute this is a portable manner. Here