Preprocess the output from interactive commands