Embedded parameter substitution

This is what parameter substitution would be one by one (transforming a picture file name into a date) :

var=“2020-12-30 11-30-55CX.mov”
p1=${var:0:11}
pt=${var:11:8}
p2=${pt//-/:}
dt=“${p1} ${p2}”

I want to do this in one shot, something like this so exiftool can take it:

dt=“${var:0:11} ${${var:11:8}//-/:}”


from Recent Questions - Stack Overflow https://ift.tt/3yKKdun
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation