Skip to content
Discussion options

You must be logged in to vote

Hi @FelipeRearden !

How about: https://stackoverflow.com/a/22159219/2754026
I do not know if this helps or not.

See also the comment in that answer:

How to make this change in-place? Is there a better solution than my dirty hack? awk '{if (/^After\=/) {$0=$0 " postgresql.service"}; print}' jetty.service > jetty.service.tmp && mv -f jetty.service.tmp jetty.service

And there the question seems to be how to insert at the end of a certain line, not below it, but I guess a simple \n should help you put the inserted text on a new line?

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@FelipeRearden
Comment options

@Taitava
Comment options

@FelipeRearden
Comment options

@FelipeRearden
Comment options

@Taitava
Comment options

Answer selected by FelipeRearden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants