Here is the equivalent bashscript I am trying to convert to fish:
for j in *.md; do mv -v -- "$j" "${j%.md}.txt"; done
Here is what I tried:
for file in *.md
mv -v -- "$file" "{{$file}%.md}.txt"
end
But it just finishes renaming all the files:
'amazon.md →' {{amazon.md}%. md} .txt
How to do it right?
source
share