substring from bash variable starting from character position -
simple question, sed command not working :( echo "some_class" | sed -e 's/.+\_\(.+\)/\1/' i want happens after _ character. please, how can fix code work? thank you. in case, "class" right answer. you don't need sed ; can use parameter expansion return substring beginning first _ : foo=some_class echo "${foo#*_}"