Assume I have files named "*.data.done"
. Now I want to rename them (recursively) back to "*.data" then ones which contains "pattern"
So here we go:
grep -l -R -F "pattern" --include '*.data.done' * | xargs -I{} mv {} ${{}::-5}
Well, this stripping of '.done' is not working (bash 4.3.11):
bash: ${{}::-5}: bad substitution
How can I do this most easiest way?