Skip to content

Instantly share code, notes, and snippets.

@perigrin
Created January 6, 2017 19:22
Show Gist options
  • Save perigrin/0d60ec28777a45c5fc0caeab5bf0326c to your computer and use it in GitHub Desktop.
Save perigrin/0d60ec28777a45c5fc0caeab5bf0326c to your computer and use it in GitHub Desktop.
#!/bin/bash -x
A=one
B=two
C=3
D=4
if [[ "$B $C $D" =~ $A ]]
then
echo $A
fi
if [[ "$B $C $D" =~ $B ]]
then
echo $B
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment