nice new tool to show version of feisty meow
[feisty_meow.git] / scripts / files / find_same_filename.sh
1 #!/bin/bash
2
3 # finds the same file name within a hierarchy, if possible.
4
5 name="$1"; shift
6 search_dir="$1"; shift
7
8 if [ -z "$name" -o -z "$search_dir" ]; then
9   echo This script needs two parameters, the filename to look for and the
10   echo directory hierarchy to look for it in.
11   exit 1
12 fi
13
14 # just get the filename or directory name component at the end.
15 name="$(basename "$name")"
16
17 find "$search_dir" -iname "$name"
18
19