I have a file that the first 4 fields are variable length and each only have 1 data item/word
FileName Tape#REC# RptName Date and the last field is comments variable length with words. The file is not delimited. I know how to use the printf sequence in awk to format the output for it to look nice, but the last field is comments and could be any number of words or stuff. Is there a way in awk to say use $5, etc ... till the end of the record and print it as one field.
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click
here
Thanks for the response, Craigs and Sridhar did not work or provide the output that I was looking for, Marco works great, a long one liner though and I have to change the formating parameters.
It's a very simple logic that we are printing the substring starting from $5 (this) no matter what spaces or characters are there later. You don't have to deal with the formatting.