I want to execute the following command:
echo $RANDOM 2>&1 >> test.txt
in this screen session:
screen -S test -X eval 'stuff "echo $RANDOM 2>&1 >> test.txt\015"'
However, instead of executing, it echoes the following:
echo 2>&1 >> test.txt
What am I doing wrong?
I want the
echo command to not just to save its ouptut to
test.txt, but to actually show that output to the screen as well.