Skip to content

Instantly share code, notes, and snippets.

@nobiki
Created April 28, 2017 12:56
Show Gist options
  • Save nobiki/51416e5979134e8c112a106e85bb37f2 to your computer and use it in GitHub Desktop.
Save nobiki/51416e5979134e8c112a106e85bb37f2 to your computer and use it in GitHub Desktop.
#!/bin/sh
status="$1"
ext="$2"
if [ '!' = "${1}" ]; then
status='\!'
elif [ '' = "${1}" ]; then
status=''
fi
if [ '' = "${2}" ]; then
ext='*'
fi
if [ '' = "${status}" ]; then
svn st | awk '$2~/\.'${ext}'$/{print $2}'
else
svn st | awk '$1=="'${status}'"&&$2~/\.('${ext}')$/{print $2}'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment