Skip to content

Instantly share code, notes, and snippets.

@brokenthumbs
Last active August 29, 2015 13:58
Show Gist options
  • Save brokenthumbs/9940750 to your computer and use it in GitHub Desktop.
Save brokenthumbs/9940750 to your computer and use it in GitHub Desktop.
#!/bin/bash
# hostname: service01.s.example.com
case $(hostname) in
*q.example.com ) echo "environment=qa";;
*s.example.com ) echo "environment=stage";;
*p.example.com ) echo "environment=production";;
esac
environment=stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment