Skip to content

Instantly share code, notes, and snippets.

@minrk
Created October 22, 2012 18:45
Show Gist options
  • Save minrk/3933331 to your computer and use it in GitHub Desktop.
Save minrk/3933331 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Simple grep pattern for showing only the active part of IPython config files
# Strips comments (only start-of-line comments, which all auto-generated lines are)
# and empty lines.
#
# Usage: showipconfig /path/to/config_file.py [ /path/to/other_config_file.py ]
#
# e.g. to see all config for a given profile, you can do:
#
# showipconfig `ipython locate profile name`/*config.py
set -e
for cfg in $@; do
echo
echo "$cfg"
cat "$cfg" | grep -v "^#" | grep -v "^$"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment