-1

Referring to this discussion how-do-i-add-newlines-between-lines-printed-on-the-command-line?, I need to insert a blank line before a text. I've:

sed -i -e '$a\
# Set TexLive 2017 PATH
PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH; export PATH \
MANPATH=/usr/local/texlive/2017/texmf-dist/doc/man:$MANPATH; export MANPATH \
INFOPATH=/usr/local/texlive/2017/texmf-dist/doc/info:$INFOPATH; export INFOPATH' .bashrc

but I'd like to have a new blank line before

# Set TexLive 2017 PATH

How can I put it? Thanx

2

I think your command is broken altogether because you need a \ after # Set TexLive 2017 PATH but to add a newline as well try this:

sed -i -e '$a\
\
# Set TexLive 2017 PATH \
PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH; export PATH \
MANPATH=/usr/local/texlive/2017/texmf-dist/doc/man:$MANPATH; export MANPATH \
INFOPATH=/usr/local/texlive/2017/texmf-dist/doc/info:$INFOPATH; export INFOPATH' .bashrc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.