Is there way to do something like thas:
cat somefile.txt | sort | uniq > somefile.txt
I.e. I want to list entire file, then pipe some actions to its content and finally put result back to source file overwriting it completely. For now I doing it by putting output to temporary file and after all moving it over original. I want to do it such simple way like linux piping allows.
bash in Linux and
cmd in Windows if it is important.