Tuesday 6 August 2019

AWK: convert into lower or upper cases


In order to convert a bash variable to lower case with awk, just use this command:
If you want to convert the content of a file (called data.csv) to lower case:
Of course to convert into upper case, simply use the function toupper() instead of tolower().
Note also that a better tool to avoid issues with special characters might be the tr unix command:

0 comments:

Post a Comment