Skip to content

Instantly share code, notes, and snippets.

@douglarek
Created December 9, 2013 07:39
Show Gist options
  • Save douglarek/7868692 to your computer and use it in GitHub Desktop.
Save douglarek/7868692 to your computer and use it in GitHub Desktop.
#!/bin/bash
for name in $(sed -n 's/.* name="\([a-z|A-Z|_]*\)">.*/\1/p' $1)
do
if ! grep -q $name $2; then
sed -i "/$name/ d" $1
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment