Re: Exclamation mark when using character classes

2021-08-21 Thread Lawrence Velázquez
ntf -v second '%(%S)T.%s' "${now%[^[:digit:]]}" "${now#[^[:digit:]]}" > printf -v minute '%(%M)T' "${now%[^[:digit:]]}" > printf -v hour '%(%H)T' "${now%[^[:digit:]]}"Incidentally, [![:digit:]] does > not work there, you ne

Exclamation mark when using character classes

2021-08-21 Thread hancooper
quot;${now%[^[:digit:]]}" > > printf -v hour '%(%H)T' "${now%[^[:digit:]]}"Incidentally, [![:digit:]] > > does not work there, you need to use the > > POSIX-specified caret (^) instead of an > > exclamation mark when using character classes. I'm not

Re: Exclamation mark when using character classes

2021-08-21 Thread Ilkka Virta
27; "${now%[^[:digit:]]*}" "${now#*[^[:digit:]]}" > printf -v minute '%(%M)T' "${now%[^[:digit:]]*}" > printf -v hour '%(%H)T' "${now%[^[:digit:]]*}" > > Incidentally, [![:digit:]] does not work there, you need to use the >

Re: Exclamation mark when using character classes

2021-08-20 Thread Kerin Millar
; "${now#[^[:digit:]]}" > > > printf -v minute '%(%M)T' "${now%[^[:digit:]]}" > > > printf -v hour '%(%H)T' "${now%[^[:digit:]]}"Incidentally, [![:digit:]] > > > does not work there, you need to use the POSIX-specified

Exclamation mark when using character classes

2021-08-20 Thread hancooper
t; > printf -v hour '%(%H)T' "${now%[^[:digit:]]}"Incidentally, [![:digit:]] > > does not work there, you need to use the POSIX-specified caret (^) instead > > of an > > exclamation mark when using character classes. I'm not sure if this is >

Re: Exclamation mark when using character classes

2021-08-20 Thread Kerin Millar
)T.%s' "${now%[^[:digit:]]*}" "${now#*[^[:digit:]]}" > printf -v minute '%(%M)T' "${now%[^[:digit:]]*}" > printf -v hour '%(%H)T' "${now%[^[:digit:]]*}" > > Incidentally, [![:digit:]] does not work there, you need to use

Exclamation mark when using character classes

2021-08-20 Thread hancooper via Bug reports for the GNU Bourne Again SHell
^[:digit:]]*}" printf -v hour '%(%H)T' "${now%[^[:digit:]]*}" Incidentally, [![:digit:]] does not work there, you need to use the POSIX-specified caret (^) instead of an exclamation mark when using character classes. I'm not sure if this is intentional or a bug in bash; man page doesn't seem to mention it.