#! /bin/bash

function p1(){
    for i in $(seq 1 10); do
	echo $i
    done
}

function p2(){
    for i in $(seq 11 20); do
	echo $i
    done
}

p1 & p2 &
wait %1 %2 