Hey, does anybody know is there a way to remove a file while read?

Something like: rm file.txt -o - | cat - ?