The -F option indicates that the slant character is to be used as the word separator. NF is the number of fields (word), so NF-1 is the next to last field. Getting the contents of the next to last field requires the value NF-1 to be dereferenced: $( NF-1 ) .