Consider the following file
col1 col2 col3 col4 col5
3 5 "Hello World" 2 8
20 NA "Alice" 1 6
1 1 "A B C" 1 154
I would like select the first three columns. The expected output is
col1 col2 col3
3 5 "Hello World"
20 NA "Alice"
1 1 "A B C"
I naively tried
$cut -d" " -f -3 myFile.txt
col1 col2 col3
3 5 "Hello
20 NA "Alice"
1 1 "A
I am having difficulties due to the spaces in between " "
. How can I cut ignoring the delimiters found in between " "
?