Redirection is not allowed here. Is
catnot allowing? But isn't redirection independent of any command running with it?
$ cat bk > bk cat: bk: input file is output file
Why does the following redirect empty the file:
$ less bk > bk
awkalso works in the similar way as
lessin regard to redirection.
awkis the one with which I actually found the problem, while the above examples are meaningless
In general, what are the right way to use redirect?