Skip to content

Instantly share code, notes, and snippets.

@jessearmand
Created September 25, 2012 08:07
Show Gist options
  • Save jessearmand/3780557 to your computer and use it in GitHub Desktop.
Save jessearmand/3780557 to your computer and use it in GitHub Desktop.
Delete found files with "keyword" as a filename inside "dir" interactively.
#!/bin/sh
dir = "$1"
keyword = "$2"
find "$dir" -name '$keyword' -exec rm -i {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment