@echo off
for /f "skip=1 delims=: tokens=2" %%i in ('ipconfig ^| find "IP"') do echo%%i


which
#!/bin/bash
for i in `echo $PATH | sed -e "s/:/\n/ig"`; do
if [ -e $i/$1 ]; then echo $i/$1 ; fi;
done;