Link to home
Start Free TrialLog in
Avatar of Uptime Legal Systems
Uptime Legal SystemsFlag for United States of America

asked on

Check Subnet IP then run command based off it's value

I'm having some difficulty getting this to work, but I have 2 LANs .111 and .112 -- what I would like to have is a script that accomplishes the following:

Check local computer's IP address to determine subnet (192.168.x.0) and then execute a command based off whether the match is 111 or 112.

Hope that makes sense, thanks in advance!
SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Uptime Legal Systems

ASKER

Both very good approaches!  Appreciate the technical expertise, gentlemen.