How to identify Jenkins Slave Operating System in a Build

Jenkins has very useful build step of executing Windows batch or Linux Shell command. User has option to choose Jenkins slave by restricting job to run on slave with specific condition. Jenkins slave may...