Using sed -i instead of cat|grep -v