I have below shell script:
while [[ -z "$hosts" ]];do
read hosts?"some string"
done
I want to convert this string to uppercase:
echo $hosts | awk '{print toupper(0)}'
Can I use this converted variable on some way? something like this:
bighosts="echo $hosts | awk '{print toupper(0)}'"
echo $bighosts
I know its not working, can you please provide me some way to use converted variable inside the script instead of creating new text file?