aplay -l > message,txt creates empty file
Why am I unable to redirect the output of the command aplay-l to a text file. The command is giving its output on the display device. When I redirect its output to text file
Code:
aplay -l > message.txt Are there any other such commands? How can they be created? |
Maybe try:
aplay -l &> message.txt If the program writes messages as "errors" this would help. |
Quote:
1)Copy & Paste the output in gui mode from terminal window in any text editor. 2)Use script command which records all standard inputs as well as error outputs. |
Redirect standard output and error output
Code:
aplay -l >> message.txt 2>&1 |
Quote:
|
Code:
aplay -l >> message.txt 2>&1 The key to understanding how it works it to remember that the redirection happens at the point it is specified. So, if you put the '2>&1' before the '>> message.txt', then you are redirecting stderr to stdout (which is still connected to the terminal), then you are redirecting stdout to the file (that this does not affect stderr, which remains connected to the terminal). |
All times are GMT -5. The time now is 09:25 AM. |