sed question

I am a newbie to linux. Could you please help me with sed replacing?
eg: �tyo435flbv#a23892132� should end up as �tyo435LINUX�
need to replace anything after letter 'f'(including) with 'LINUX'

sed "s/f.*/LINUX/"

Awesome scott, such a simple one.Yeah, looks simple when you know it :slight_smile:

And, if you happen to have this string in a shell variable instead of in a file, and you're using a standards conforming shell (such as bash or ksh), you could use:

x="tyo435flbv#a23892132"
printf "%s\n" "${x%%f*}LINUX"

which produces:

tyo435LINUX