Is it possible to put the output of a command into a file? I tried doing a
echo history > history.txt
But it put the text history instead into that file.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just do
history > history.txtwithout the echo. That should do it. When you do echo history, you are telling unix to print history to screen rather then execute it, which is whyecho history > history.txtonly contains the word history.