i have a problem about bash, command is like:
echo helloworld > hello.txt
cat <hello.txt >hello.txt
at first, there are stuff in hello.txt. what i expect is that it should seem nothing happens to hello.txt after executing the command, but there is nothing in hello.txt then.
is it a mechanism of bash, or is there something i did not understand about linux file descripor?
maybe bash establish only one fd for a certain file? am i right?
can you help me?
/br
ruan