Reputation: 12642
I used to have this alias in tcsh to find files on the filesystem.
alias findf 'find . -name \!* -print'
How do I write this in bash shell?
Upvotes: 4
Views: 285
Reputation: 81012
That's a shell function and not an alias (assuming \!*
is a placeholder for the alias "arguments").
To accept just a single argument:
findf() {
find . -name "$1" -print
}
To accept any number of arguments (not that this is very useful for the argument to -name
):
findf() {
find . -name "$@" -print
}
Upvotes: 2