Can't change case of letter in Zsh

Code in my Zsh

#!/bin/zsh
q=$1

open "http://mathworld.wolfram.com/$q.html"

      

I put the app login

triangle

      

I get an error in Wolfram because the first letter must be capitalized.

How can you change the case for the first letter in the q variable?

0


a source to share


1 answer


# q=triangle
# echo ${(C)q}
Triangle

      



See Parameter Expansion Flags .

+2


a source







All Articles