D
Deleted member 62525
Guest
I need some advice from coders here that have been using this version of Linux. I appreciate your help in advance.
Here is this example:
Run command "curl -s -I http://sbc.io/hosts/hosts | grep "[Ll]ast-[Mm]odified" | cut -c16-"
This retrieves Last-Modified time for a specific file. In this case it is a string Tue, 13 Apr 2021 14:04:19 GMT
I would like to convert this string to a format +%Y%m%d%H%M .
It is very easy on macOS/BSD since it does support date converting "from" to "new" format as in
date -jf '%A, %d %B %Y %H:%M:%S %Z' "${mydate}" '+%Y%m%d%H%M'
However on Asus Linux version I am not familiar how this can be converted. Any ideas or suggestions, I would appreciate it. Maybe someone already had solved it or do I need to include some entware lib to help with this work.
Here is this example:
Run command "curl -s -I http://sbc.io/hosts/hosts | grep "[Ll]ast-[Mm]odified" | cut -c16-"
This retrieves Last-Modified time for a specific file. In this case it is a string Tue, 13 Apr 2021 14:04:19 GMT
I would like to convert this string to a format +%Y%m%d%H%M .
It is very easy on macOS/BSD since it does support date converting "from" to "new" format as in
date -jf '%A, %d %B %Y %H:%M:%S %Z' "${mydate}" '+%Y%m%d%H%M'
However on Asus Linux version I am not familiar how this can be converted. Any ideas or suggestions, I would appreciate it. Maybe someone already had solved it or do I need to include some entware lib to help with this work.