<std-output> > <text-file> echo "random text" > sample.txt cat sample.txt > newfile.txt systeminfo.exe >> newfile.txt