3 ms·
for file in *.txt; do mv "${file}" "${file// /}"; done
by anc84 11y ago
for file in *.txt; do mv "${file}" "${file// /}"; done
- tosseraccount 11y agoWellIdidnotknowthat.thanks!
- jaytaylor 11y agoOff-topic: Wow thanks, I didn't know about that form of bash variable substitution! It's documented under the heading: ${var/Pattern/Replacement} at http://www.tldp.org/LDP/abs/html/parameter-substitution.html http://www.tldp.org/LDP/abs/html/parameter-substitution.html