Given String:->
approximateLastUseTime: '2019-10-15T16:56:07.082500Z'
I need to extract everything after the T and before the Z (after the colon)
Given String:->
approximateLastUseTime: '2019-10-15T16:56:07.082500Z'
I need to extract everything after the T and before the Z (after the colon)
With bash
, you can use substring operator, or prefix/suffix
T=2019-10-15T16:56:07.082500Z
# Using substring
echo ${T:11:15}
# Using prefix/suffix
T1=${T#*T}
T1=${T1%Z*}
echo "$T1"