Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Portable means that will work on any Unix/Unix like distribution. The answer you accepted rely on a command that is not standardized, that has a different syntax depending on the implementations, and that might be or is missing on many Unix distributions (freeBSD, OpenBSD, Solaris, HP-UX, AIX) and probably in some Linux ones. Commented Oct 28, 2015 at 5:02
  • Your answer is definitely the best portable solution. +1. :) If it's for a personal script (like I suspect from the question), it will only need to be run on one distribution, and rename is definitely more readable. Commented Oct 28, 2015 at 8:10