sed substitute previous command and run