• + 0 comments
    paste -sd ' ' | cut -d' ' -f4-8
    

    paste -sd ' ' This command takes input from standard input and concatenates all the lines together using spaces to separate them. The -s option tells paste to join all the lines from input together and the -d option specifies the delimiter (in this case a space). The result is a single line of output with all the lines from the input glued together with spaces.

    cut -d' ' -f4-8 This command takes the output from paste and splits it into fields using spaces as the delimiter. The -d option tells cut to use a space as the field delimiter. The -f option specifies which fields to keep. In this case, -f4-8 tells cut to keep fields 4 through 8 (inclusive). So, the final output will contain only the 4th through 8th words in the input.