1

Let's say I have file.txt

water 1
lorem 0
ipsum 0

I cut the last column and redirect output to file itself with this:

cut -d' ' -f 1 file.txt > file.txt

I expect current content of file.txt is

water
lorem
ipsum

However, I got blank file in file.txt

0 Answers0