I'm going to make a video of image files, but the filenames contain numbers in scientific notation, so the ordering of the name will not be correct.
The filenames are in this format:
ABC_1.000000E-01.png ~ ABC_1.100000E+01.png,
DEF_1.000000E-01.png ~ DEF_1.100000E+01.png,
GHI_1.000000E-01.png ~ GHI_1.100000E+01.png,
.
.
.
If I change the number notation used for the numbers, the order is not correct again, so I want to change it as below.
ABC_001.png ~ ABC_110.png,
DEF_001.png ~ DEF_110.png,
GHI_001.png ~ GHI_110.png,
.
.
.
How may I do this on my Linux system?
find
(https://unix.stackexchange.com/questions/321697). Usingcut
on strings is costly, just use standard parameter substitutions instead, e.g.filename=${file%%_*}
. – Kusalananda Dec 17 '21 at 07:58