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*

2
  • Hello Ralz, Thanks for your time and guidance I have understood, here I am not sure how to do comparison of 4 dates like if [ date1 -ge date2 ] if it was same date then I can use [[ date1 = date2 && date3 == date4*]] this where I am not sure what to use and how Commented Mar 2, 2023 at 9:11
  • if you convert the date to unix time, you can simply compare unix time which number is greater, if the dates are not the same convert them to unix time and compare which number is bigger, that would be the quickest thing to do, without parsing formating, you can also convert them to 20230220092225 format '%Y%m%dH%M%S'. see also this unix.stackexchange.com/questions/84381/… Commented Mar 2, 2023 at 9:20