I'm trying out the code that answers this questions:
How do I change the extension of multiple files?
I tried this:
# Rename all *.js to *.ts
for f in *.js; do
mv -- "$f" "${f%.js}.ts"
done
However that results in this:
Oles-MacBook-Pro:src oleersoy$ ./rename.sh
mv: rename *.js to *.ts: No such file or directory
I also tried this:
rename js ts *.js
And the result of that is:
Bareword "js" not allowed while "strict subs" in use at (eval 2) line 1.
Thoughts?
*.js
in the current directory. – Kusalananda Jun 04 '21 at 17:52