I’d like to change the path and extension of a file in a variable at once e.g. do the following
for F in $( find /foo/bar -name "*.ext" ); do
Ftmp=${F%.ext}
cp $F ${Ftmp//bar/b0r}.tmp
done
without a temporary variable
Can two string operations be applied at once with bash only means?
Use the Bash temporary variable