|
Mac GeekeryGet your geek on. |
Changing CaseWhat standard app can be used to change the selected text to all lower case? JC I thought about doing this in Perl, because I’m a dork that way. The -f technically implores
#!/usr/bin/awk -f
{ print tolower($0); }
Sorry, we don’t give out iTunes for one liners. Unless it’s a really cool one-liner. Then we’ll think about it. This one’s t3h l4me. For the record, codepoet So, to be more clear: take the above one-liner and save it in a file, mark it executable, and then invoke it. I saved it as ./tolower filename.txt > filename-lower.txt |
|
||||
select text, right click -> convert -> to Lowercase
or ctrl-shift U
While the command solutions works great, wouldn't it be better if you could do the same without resorting to the shell?
Well you can, if you use my UnixServices service provider, simply select text, go to the Services menu and choose whatever formatting command you have defined.
And yes, you read it right, the app is fully extensible, you define the commands you want available, so you can map to any command line tool to process text in any way you'd like. Best of all, its priced to sell, the app is free. Enjoy.
Like most things on the command line, There’s More Than One Way to Do It.
Yes, but does vim do streams from the shell? I’ve never seen it used as such…
—
cp
:%s/\(.\)/\U\1/gawk works, but the more specific tool is tr:
tr '[:upper:]' '[:lower:]' < filename.txt