I would like to get the string from the file after user defined keyword. Example if keyword is "yellow_y", expected output to be acc.
Tried grep -oP '(?<=yellow_y).*' but not work.
File:
yellow abc \
yellow_x abc \
yellow_y acc \
blue abb \
pink abb \
pink_xx acd \
awk,awk '$1 == "yellow_y"{print $2}' file