Skip to content

Instantly share code, notes, and snippets.

@sibson
Last active August 29, 2015 13:56
Show Gist options
  • Save sibson/9213762 to your computer and use it in GitHub Desktop.
Save sibson/9213762 to your computer and use it in GitHub Desktop.
Find classes that changed between Bootstrap 2 and 3
#!/bin/sh
searchpath='.'
if [ $# -gt 0 ]; then
searchpath=$1
shift 1
fi
searchterm="-e container-fluid -e row-fluid -e span* -e offset* -e brand* -e navbar -e nav -e hero-unit -e icon* -e btn -e btb-mini -e btn-small -e btn-large -e visible-phone -e visible-tablet -e visible-desktop -e hidden-phone -e hidden-tablet -e hidden-desktop -e input-prepend -e input-append -e add-on -e btn-navbar -e thumbnail"
echo "$searchterm"
find $searchpath \
-name "*.html" -or \
-name "*.htm" -or \
-name "*.tmpl" |
xargs grep -rn $searchterm /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment