Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash how to convert text to lowercase or uppercase

# Basic syntax:
awk '{print tolower(string)}'
awk '{print 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
Source by thomas-cokelaer.info #
 
PREVIOUS NEXT
Tagged: #bash #convert #text #lowercase #uppercase
ADD COMMENT
Topic
Name
6+2 =