Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cazepeda/edfdd3c31de4b9f830515c7cbdc9bce7 to your computer and use it in GitHub Desktop.
Save cazepeda/edfdd3c31de4b9f830515c7cbdc9bce7 to your computer and use it in GitHub Desktop.
Applescript Capitalize First Letter of Selected Text
on run {input, parameters}
set capitalize to ¬
(do shell script "/bin/echo " & input & " | /usr/bin/awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1'")
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment