replace grep with sed, small correction to sed pattern