Created
November 19, 2015 17:32
-
-
Save mwhahaha/7cc52842e81b59d18908 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a quick hack to try and extract variables from puppet file | |
# and prints out a doc string, only works if the parameters are only | |
# have 2 spaces in front | |
egrep '^ \$(.*)\s+=\s+(.*)$' file.pp | \ | |
sed -e 's/^ \$\([a-zA-Z0-9_]*\).*= \(.*\)$/# [*\1*]=# Default value is \2/g' | \ | |
tr "=" "\n" |
Author
mwhahaha
commented
Nov 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment