2 ms·
In zsh you can use: for f in **/data.json; mv $f $f:r.yaml Which is even shorter, and easier. In bash you need a bit more syntax: for f in **/data.json;
by arp242 4y ago
In zsh you can use:
for f in **/data.json; mv $f $f:r.yaml
Which is even shorter, and easier. In bash you need a bit more syntax:
for f in **/data.json; do mv $f ${f%.json}.yaml; done
That second example can probably also be simplified a lot in a similar fashion.