'How to convert ouput into uppercases in kali linux shell

I need to convert from 'ifconfig' command output to Uppercases:

I've tried like this:

ifconfig | tr [:upper:]


Solution 1:[1]

By default Kali Linux uses bash as the default shell. To convert the output of ifconfig from lowercase to uppercase in a bash shell run the following command:

ifconfig | tr '[:lower:]' '[:upper:]'

The | character is used to pipe the output of ifconfig to tr '[:lower:]' '[:upper:]' . The tr command in bash understands the POSIX keywords :lower: and :upper: because bash is a POSIX-compliant shell.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1