#!/bin/bash
s='bob mary mike bill kim jim john'
awk '{for(i=1;i<NF;i++) print $i,$(i+1)}' <<< "$s"