Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Why quotes (") around $( ) ? Commented Aug 23, 2015 at 18:43
  • 2
    @Archemar Habit mostly. It is not necessary if date's format does not have spaces. Commented Aug 23, 2015 at 19:06
  • @kdhp, the date format in this way will be for example 15-08-24 while for right comparison it should be 2015-08-24 is there a way to change it to this format? Commented Aug 24, 2015 at 5:56
  • 1
    @Azizieh7 The year should be correct, at least according to the standard. It might be that what should be an upper-case Y is, in fact, in the lower-case. As for changing the format, you can check your system's man date, or the standard linked above. Commented Aug 24, 2015 at 7:12
  • 1
    You want an awk pattern of just $3>date (with empty=default action) no /.../ slashes Commented Aug 25, 2015 at 23:32