When I try to insert new line in OSX using sed I'm getting the below error
extra characters after \ at the end of a command
Current File content is
{
'localhost' => ['domain_name' => 'default', 'domain_type' => 'mobile'],
}
Expected content is
{
'localhost' => ['domain_name' => 'default', 'domain_type' => 'mobile'],
'dev.ops' => ['domain_name' => 'default', 'domain_type' => 'mobile'],
}
The command I'm using is
sed -i '' "/localhost/a\ 'dev.ops' => ['domain_name' => 'default', 'domain_type' => 'web']," FILENAME