#!/bin/sh
while getopts sPn: option
do
case $option in
n)
if [ `echo "$OPTARG" | cut -d '.' -f 3` = 13 ]
then ssh user_nmap@10.10.113.1 $OPTARG; #RUN
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 3 ] && [ `echo "$OPTARG" | cut -d '.' -f 4 | cut -d '/' -f 1` = 129 ]
then ssh user_nmap@10.10.103.1 $OPTARG; #Alex k3
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 3 ] && [ `echo "$OPTARG" | cut -d '.' -f 4 | cut -d '/' -f 1` = 1 ]
then ssh user_nmap@192.168.3.1 $OPTARG; #Alex k10
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 2 ]
then ssh user_nmap@10.10.103.1 $OPTARG; #Alex
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 11 ]
then ssh user_nmap@192.168.11.1 $OPTARG; #SB
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 4 ]
then ssh user_nmap@192.168.4.1 $OPTARG; #KZN-Kalinina
elif [ `echo "$OPTARG" | cut -d '.' -f 3` = 15 ]
then ssh user_nmap@192.168.15.1 $OPTARG; #KZN-Suvar
fi
esac
done