Skip to content

Instantly share code, notes, and snippets.

@th507
Created May 30, 2013 06:44
Show Gist options
  • Save th507/5676105 to your computer and use it in GitHub Desktop.
Save th507/5676105 to your computer and use it in GitHub Desktop.
Show modified file in a svn/git repository
#!/usr/bin/env bash
svncount=`svn status . -q | grep '^M' | wc -l`
if [ "$svncount" -gt 0 ] ; then
status=`svn status . -q`
else
status=`git status -s`
fi
echo $status | awk '/^M/ {print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment