commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Anyone know how to avoid title casing some words, like 'to', 'of', 'that', etc.?
There are 12 alternatives - vote for the best!
All words of the filenames except "a", "of", "that" and "to" are capitalized.
To also match words which begin with a specific string, you can use this:
rename 's/\b((?!hello\b|t)[a-z]+)/\u$1/g' *
This will capitalize all words except "hello" and words beginning with "t".
If you can do better, submit your command here.
You must be signed in to comment.