column_name="vivek"
column_name2="ViVeK"
column_name=$(echo $column_name | awk '{print tolower($0)}')
column_name2=$(echo $column_name2 | awk '{print tolower($0)}')
echo "column name 1 lower: $column_name"
echo "column name 2 lower: $coulmn_name2"
if [[ "$column_name" = "$column_name2" ]]
then
echo "matching"
fi
but the output is showing as matching even though the output of column_name2 is null... i think the syntax for converting to lower case or upper case is not working.. i even tried typeset -u column_name but this syntax is not working... plz help me out.... :wall::wall:
what is the difference between last two lines...? both are same right..
---------- Post updated at 11:28 AM ---------- Previous update was at 11:26 AM ----------
hey got the output.. thanks but what was the typo...? is it the italised characters.. coz when i copy pasted the last line it worked thanks a lot
---------- Post updated at 11:35 AM ---------- Previous update was at 11:28 AM ----------
.. i had used the above code in a lengthy code of mine there its not working again.... but when i used the same code independently in a script its working.... do you have any alternative like tr or sed?