sorry -- it wasn't my grep command it seems the hold up is when I am trying to remove leading and trailing white spaces.
gawk '{printf ("%s|%s|%s|%s|%s\n",substr($0,16,10),substr($0,26,14),substr($0,50,17),substr($0,56,16),substr($0,112,78))}' <test.txt | sed 's/ //g' - | sed 's/ |/|/g' - | sed 's/| /|/g' > new.txt
there is no set tab of white spaces and I do not want to put a "|" in between words in a field.
I thought that maybe using gsub would do it -- but I can't seem to get that to work
anyway of reducing the time in removing leading and trailing spaces in a field.
Thanks