Substitute the end of the line with (i.e., append) "text" if the line starts with "x":
sed '/^x/ s/$/text/'

Reply via email to