3 ms·
Dealing with one file is no problem. A regular rename on the command line or gui file manager of choice works well. The difficulties come when trying to work
by rogerbinns 10y ago
Dealing with one file is no problem. A regular rename on the command line or gui file manager of choice works well. The difficulties come when trying to work with multiple files, and why you'd resort to the command line. Amusingly, the rename on Windows just works.
UNIX makes it difficult because of the wildcard expansion. You can start writing some script, but there are gotchas galore such as correct escaping, IFS, shell portability, dry runs, interactivity, error handling and the list goes on. Having something that works as well as the simple Windows command is hard work, and before you know it end up publishing a github repository!
- AdieuToLogic 10y agoDealing with one file is no problem. ... The difficulties come when trying to work with multiple files, and why you'd resort to the command line. Maybe we just have a different perception regarding these workflows. Not that either is superior or anything, just different. My background is one where the command line is not something I turn to, but instead one where I begin. UNIX makes it difficult because of the wildcard expansion. In this specific situation, your point is spot on. I submit that in many other situations, the wildcard expansion employed by many Unix shells is very helpful. Not every tool is applicable for every situation and the specific case of renaming multiple files to those with different extensions highlights a shortcoming of many Unix shells. Perhaps an explanation is due to file extensions being of little importance to the vast majority of Unix programs. Having something that works as well as the simple Windows command is hard work ... Here, I will respectfully disagree and step away from this thread :-).