Bash versus tcsh argument argument
I used this alias in tcsh to find files in the filesystem.
alias findf 'find . -name \!* -print'
How do I write this in a bash shell?
+3
gaitat
source
to share
1 answer
That is a wrapper function, not an alias (assumed to be \!*
a placeholder for alias "arguments").
To take just one argument:
findf() {
find . -name "$1" -print
}
To accept any number of arguments (not that it's very useful for an argument -name
):
findf() {
find . -name "$@" -print
}
+2
Etan reisner
source
to share