#!/bin/sh

get_port_config ()
{
  port=$1
  type=$2

  grep "^||$port||" | cut -c 6- | tr "|" "\n" | while read line
  do
    echo line=$line
  done
}

for e in `seq 1000`
do
  echo "||5||psw:172.17.100.1:4||ipmi:172.17.60.195" | get_port_config 5 | head -n 1 > /dev/null && exit 1
done
