Mercurial > dedupe
view scripts/removeWithSignature @ 113:27e628852401
Add some error checking.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Tue, 03 May 2016 02:23:14 +0200 |
| parents | 3951f6d27219 |
| children |
line wrap: on
line source
#!/bin/bash FORCE=false while getopts 'f' val do case $val in f) FORCE=true ;; ?) exit 1; esac done let nopts=OPTIND-1 shift ${nopts} if $FORCE then command=rm else command=echo fi TARGET=$1 shift while [ -n "$1" ] do ~/projects/dedupe/scripts/duplicates.sh -s $TARGET | grep $1 | cut -d\| -f3- | xargs -d '\n' -n 1 $command shift done
