top of page
Writer's pictureShashi Kallae

CAPITALIZE ALL THE LETTERS IN A STRING (LINUX SCRIPT)

Here is a Linux script to capitalize all the letters in a string:


SCRIPT:

---------------------------------------------------

#!/bin/bash


# Get the string from the user

read -p "Enter a string: " string


# Capitalize all the letters in the string

capitalized_string=$(echo "$string" | tr '[:lower:]' '[:upper:]')


# Print the capitalized string

echo "The capitalized string is: $capitalized_string" ---------------------------------------------------

Use code with caution.


HOW TO USE:

To use this script, save it as a file with the .sh extension, such as capitalizealltext.sh. Then, run the script in the terminal by typing the following command:




9 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page