Unable to change the case of a letter in Zsh
Question
The code in my Zsh
#!/bin/zsh
q=$1
open "http://mathworld.wolfram.com/$q.html"
I put the input to the app
triangle
I get an error at Wolfram, since the first letter must be a big one.
How can you change the case for the first letter in the variable q?
Solution
# q=triangle
# echo ${(C)q}
Triangle
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow