Skip to content

Instantly share code, notes, and snippets.

@silentbicycle
Created August 12, 2013 18:47
Show Gist options
  • Save silentbicycle/6213801 to your computer and use it in GitHub Desktop.
Save silentbicycle/6213801 to your computer and use it in GitHub Desktop.
If you MUST sound like an IETF RFC (using cat is RECOMMENDED)
#!/bin/sh
sed -e "s/must/MUST/" \
-e "s/must not/MUST NOT/" \
-e "s/required/REQUIRED/" \
-e "s/shall/SHALL/" \
-e "s/shall not/SHALL NOT/" \
-e "s/should/SHOULD/" \
-e "s/should not/SHOULD NOT/" \
-e "s/recommended/RECOMMENDED/" \
-e "s/may/MAY/" \
-e "s/optional/OPTIONAL/"
@whitequark
Copy link

grep -q "MUST" doc && 
  grep -q "SHALL" doc && 
  grep -q "SHOULD" doc &&
  grep -q "RECOMMENDED" doc && 
  grep -q "MAY" doc && 
  grep -q "OPTIONAL" doc && 
  echo BINGO

/via @grindars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment