bash substring matching


  1. #!/bin/bash
  2. [[ "$(hostname -s)" =~ $'dev' ]] && exit
  3. echo "we are not a dev host"

Comments

Popular posts from this blog

Debugging pfsense firewall rules clearly and easily

Direct ssh to a server via proxy using putty/plink on Windows

telnet vs netcat