= delimited

name=matt
family=fisher
username=garbage

this is a sample file, I need the value of user name that now are garbage.
how I can do it?

by grep or sed or awk.

Thanks in advance

If you need lines that have the name garbage in them use this

sed -n -e "/=garbage/p" file.txt
awk -F"=" '/username/{print $2}' inputfile
or
grep 'username' inputfile | cut -d"=" -f2-
IFS="="
while read line;do
set $line
if [ $1 = "username" ];then
echo $2
fi
done < yourfile
cat filename | awk -F"=" '/garbage/{print $2}'

Realy Thanks coolboys!