SED is making my head-hurt...

Hi all!

Shell-scripting n00bie here... I'm having a terrible time getting my head around how to use the sed command & could really use some help. Basically, I'm trying to use sed to remove all characters of a line up to a '<' character within a text-file. It would be spectacular if there would even be a way to do-that on all lines wthin a text-file, as I'm looking to execute this sed command within a shell-script.

Tried the following so-far:

sed 's/.^<//' $filename
sed 's/^<//' $filename
sed 's/.$<//' $filename
sed 's/$<//' $filename

Thanks!

Did you mean this?

echo "abc<def" | sed 's/^.*</</'

That works perfectly, thx matrixmadhan!!! :smiley: