Created
August 31, 2014 02:01
-
-
Save mesprague/6ce9d8ed2fd7e6ac7968 to your computer and use it in GitHub Desktop.
One liner for the asus RT-N66U router to display nvram contents as json
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
nvram2json() { echo $(nvram show 2>/dev/null | egrep -v '^$' | sort | sed 's/^\(.*\)=\(.*\)/"\1":"\2"/;1 s/^/{\n/;$ !s/$/,/;$a}'); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment