Skip to content
Snippets Groups Projects
Commit 2a4f0ee0 authored by Mattijs Janssens's avatar Mattijs Janssens
Browse files

additional argument

parent da11607f
Branches
Tags
No related merge requests found
#!/bin/sh
find . \( -name '*.dep' \) -print | xargs -t rm
if [ $# -eq 0 ]; then
find . \( -name '*.dep' \) -print | xargs -t rm
elif [ $# -eq 1 ]; then
echo "Removing all dep files containing $1..."
find . -name '*.dep' -exec grep "$1" '{}' \; | sed -e 's/:.*//' | xargs -t rm
else
echo "Usage: `basename $0` to remove all .dep files"
echo " `basename $0` <file> to remove all .dep files referring to <file>"
exit 1
fi
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment