Any way to do this quickly without using a temp variable? Is there a built in function?
Edit: Thanks for the answers guys. Looks like I need to clarify my question but for the most part you guys assumed correctly: There are two files and the filenames names are reversed.
- File A has name B-name.file
- File B has name A-name.file
I’d like for File A to be named A-name.file and File B to be named B-name.file.
I agree, the situation doesn’t happen often but it just happened to me and I wanted a quick fix.
ok, stupid question, but why can’t you simply do something like (in a shell script):
and yes of course it uses a temporary file, but its more concise then the other answers.