Mercurial > dedupe
comparison scripts/statistics.sh @ 112:3951f6d27219
Add various useful scripts. Refactor out SQL-statements.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Tue, 03 May 2016 02:20:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 111:9d9926a6011f | 112:3951f6d27219 |
|---|---|
| 1 #!/bin/bash | |
| 2 | |
| 3 PREFIX=$1 | |
| 4 | |
| 5 | |
| 6 if [ -n "$PREFIX" ] | |
| 7 then | |
| 8 SEDPREFIX=$(echo $PREFIX | sed -e 's/\//\\\//g') | |
| 9 SQLPREFIX=$(echo $PREFIX | sed -e "s/'/''/g") | |
| 10 | |
| 11 PREFIX="WHERE path LIKE '${SQLPREFIX}%'" | |
| 12 fi | |
| 13 | |
| 14 . $(dirname $0)/STATEMENTS | |
| 15 | |
| 16 sqlite3 ~/.DeDupe.sqlite "${STATISTICS_STATEMENT}" |
