I am trying to insert a line into a coffee script using sed and it looks as if it is ignoring my first tab character.
The file I want to insert into has a line like this:
karmaServer.start
and I want to insert a line after it like this:
karmaServer.start
flags: ['--no-sandbox']
So I wrote a sed script that I think should work
sed "/^\t\tkarmaServer.start/a\t\t\t\tflags: ['--no-sandbox']" build/unit-test.coffee
although the result is quite odd. I get the following
karmaServer.start
t flags: ['--no-sandbox']
And I don't understand why it starts the line with a t
character or how to get rid of it.
any ideas?
sed
s, note. Spinellissed
says "extra characters after\
at the end ofa
command" and fails.