-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

user41063
  • 153
  • 6

1 Answers1

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
jesse_b
  • 35,934
  • 12
  • 91
  • 140