Let's imagine we have a file:
foo bar foo1 bar1
I want to cut every second word in every line, so I want file to look like this:
I am trying to use
cut -d ' ' -f -1 but what I get is:
How can i preserve line endings in the file?