With awk it's easy to use a space/several spaces as delimiter cause that's the default delimiter. So with the previous example it would be:
Code:
echo sequenceofwords| awk '{print $1, $2, $3}'
(Note that if the
sequenceofwords is a string of three fields separated by a space the output of this awk command will be exactly like the input. This is because of the comma's in the print statement, they separate the outputfields by spaces. Without the comma's the three outputfields will be concatenated.)
Regards