epoch time

Hi all,

I got a file with epoch times like this.
1264010700
1264097400
1263529800
1263762900
1263924300

What I want.
I want all epoch times which are > current epoch time written to a file. So everything that is < will be ignored and not written to the file.

Thanks

awk -v D=$(date '+%s') '$1 > D' in_file > out_file
awk 'systime()>$1' urfile

What is your OS?

  • The date command of HP-UX e.g. don't support the %s option.
  • systime() works only with gawk