solve sed $NAME problem