Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Monday, April 22, 2013

A working bashrc function without parameter expansion (globbing)

I have noticed that the function I had under my bashrc script to simplify the syntax of the find command wasn't actually working for all cases. When I passed asterisks for the search criteria, I was left with weird findings resulting from parameter expansion (globbing). Here is the failing function (from my home .bashrc):
function findf() {
   find $1 -name "$2" 2>/dev/null
}