tags:

views:

48

answers:

1

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?

+2  A: 
# q=triangle
# echo ${(C)q}
Triangle

See Parameter Expansion Flags.

Török Gábor
Thank you for your answer!
Masi