#!/bin/sh
file="/tmp/3.txt"
ab=“fff”
cc=“123”
if grep -q “
c
c
"
"
cc" "
cc""file”
then
sed -i “/$cc/a $ab” $file
sed -i "/$cc/d" $file
fi