shell and file input (not tested)