For some reason whenever I try to redirect errors to file using 2>
it doesn't work and I get a message that treats the '2' and '>' as separate.
Strangely enough, when I press the up arrow to return to the previous command an extra space is added so that 2>
becomes 2 >
even though this is not what I wrote.
For example, if I type:
rm dir1 2> err1
It doesn't forward the error to the file. When I press the up arrow the line turns into:
rm dir1 2 > err1
I would greatly appreciate any insights regarding this quite strange issue. Thanks