regex - get all lines NOT end with 'rpms' in sed -


i want append following line lines. if have tips, please let me know. lot.

i have tried

sed -e '/?!(rpms$)/{n;s/\n//}' filename 

but failed.

i think looking put lines don't end rpms on single line:

sed -e ':a;/rpms$/!{n;s/\n//;ba}' 

instead of trying negate pattern, can negate test putting negation operator ! after pattern.

to handle case there more 2 lines without rpms @ end, added label :a , unconditional jump ba label.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -