uppercase first str bash
foo="bar"
echo "$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
#returns 'Bar'
uppercase first str bash
foo="bar"
echo "$(tr '[:lower:]' '[:upper:]' <<< ${foo:0:1})${foo:1}"
#returns 'Bar'
bash how to convert text to lowercase or uppercase
# Basic syntax:
tolower(string)
toupper(string)
# Example usage:
awk '{print tolower($0)}' input_file
# This prints every row ($0) converted to lowercase
awk '{print toupper($3)}' input_file
# This would print the third field ($3) converted to uppercase
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us