Write a command to convert a string to Initcap

echo apple | awk ‘{print toupper(substr($1,1,1)) tolower(substr($1,2))}’

Category: UNIX Interview Questions.