Skip to content

Instantly share code, notes, and snippets.

@strarsis
Forked from fedir/catVagrantfilePure.sh
Created February 26, 2017 15:36
Show Gist options
  • Save strarsis/b0a805d1c7b172a90eb07f3b200fdd15 to your computer and use it in GitHub Desktop.
Save strarsis/b0a805d1c7b172a90eb07f3b200fdd15 to your computer and use it in GitHub Desktop.
Strip Vagrantfile from comments and empty lines
#!/bin/bash
cat Vagrantfile | grep -vE '(^[[:space:]]*($|(#|!|;|//)))'
cat Vagrantfile | grep -vE '(^[[:space:]]*($|(#)))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment