#!/bin/bash sed -i '/ctx = {/a\ "client_password": "123456",' $1 sed -i '/ctx = {/a\ "server_password": "123456",' $1