escape $ in sed's func_sgwi