You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
171 B

6 years ago
#!/bin/bash
for file in *.md;
do
mv -i "${file}" "${file/md/txt}"
done
#原理:
#${var/Pattern/Replacement}
#Pattern第一个匹配项在var中替换为replacement