Skip to main content
7 events
when toggle format what by license comment
Oct 29, 2020 at 17:27 history edited αғsнιη CC BY-SA 4.0
added 1 character in body
Mar 6, 2017 at 21:36 comment added Hima @Stephene, I tried with below command to get next month last saturday $ cal 04 2017 | awk 'NF <= 7 { print $6 }' | grep -v "^$" | tail -1 28 It displays the number 28, but I'm looking for the complete date 04/28/2017, plz suggestm if it possible with it.
Mar 6, 2017 at 17:52 comment added Tim Kennedy "bash is an unfinished clone of ksh" -- I have always felt that way.
Mar 6, 2017 at 15:43 history edited Stéphane Chazelas CC BY-SA 3.0
added 623 characters in body
Mar 6, 2017 at 15:01 comment added Stéphane Chazelas @Hima, I did say in ksh93. bash is an unfinished clone of ksh (with some features of (t)csh and zsh and even a few of its own). Recent versions of bash have added support for printf '%(format)T' from ksh93, but not the ability to parse this kind of date specifications. Replace your she-bang with #! /path/to/ksh93 -.
Mar 6, 2017 at 14:36 comment added Hima #!/bin/bash . I'm getting the below error in bash $ printf '%(%F)T\n' 'next month, first Monday' -bash: printf: `(': invalid format character
Mar 3, 2017 at 21:23 history answered Stéphane Chazelas CC BY-SA 3.0