How to awk or grep the last column in file when date on column contains spaces?

Hi have a large spreadsheet which has 4 columns

APM00111803814  server_2        96085   Corp IT Desktop and Apps
APM00111803814  server_2         96085   Corp IT Desktop and Apps
APM00111803814  server_2        96034   Storage Mgmt Team
APM00111803814  server_2        96152   GWP Implementations UK
APM00111803814  server_2        96138   GWP Production-UK
APM00111803814  server_2        96109   GWP Production - US

I need to be able to read this file and define a variable for each entry in each column. The last column has spaces but I want to be able to read it a one variable. I am trying to put it into a while loop but the last column will only read the first word/characters (for example in the first line Corp)

For example

while read c1 c2 c3 c4
do
echo "$c1 $c2 $c3 $c4"
done < file.txt

Obviously this does not work. Can anybody help me out with this?

Why would it not work with a while read loop? Have you tried it?

My apologies. It actually does work. My bad. There are other columns after C4 which I did not paste and it picks these up as well. I just need to make sure that the column with the spaces is the last column and the while loop will work. Thanks for you reply.

If you specify less parameters than there are fields then any leftover data is assigned to the last parameter.

EDIT: As you've noticed :).

If there's more data afterwards (that you don't want) then you could pre-process the file with man cut ("posix").

cut -c40- file1

Try this:

nawk '{ f4="";
        for ( i=4; i<= NF; i++)
                f4=f4 $i;
        print $1, $2, $3, "<", f4, ">"; }'

Can you post or attach the actual input file and specify exactly which columns you want in the output...