0

I found solution but it doesn't working http://www.cyberciti.biz/faq/linux-unix-shell-programming-converting-lowercase-uppercase/

[root@mg0016 tmp]# y="this Is A test"
[root@mg0016 tmp]# echo "${y^^}"
-bash: ${y^^}: bad substitution
Dairo
  • 822
  • 1
  • 9
  • 22
Satish
  • 16,544
  • 29
  • 93
  • 149

2 Answers2

2

You can use any one of the following code :

$ tr '[:lower:]' '[:upper:]' < input.txt > output.txt

or

$  sed -e 's/\(.*\)/\U\1/' input.txt > output.txt
user1598202
  • 250
  • 1
  • 2
0

I found following one! and it works!

[spatel@mg0016 ~]$ echo "lower" | awk '{print toupper($0)}'
LOWER

Thanks for reply all.

Satish
  • 16,544
  • 29
  • 93
  • 149