Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

Possible Duplicate:
How to pass parameter to alias?How to pass parameter to alias?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

Possible Duplicate:
How to pass parameter to alias?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

Possible Duplicate:
How to pass parameter to alias?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

insert duplicate link
Source Link

Possible Duplicate:
How to pass parameter to alias?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

Possible Duplicate:
How to pass parameter to alias?

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

Post Closed as "exact duplicate" by Michael Mrozek
deleted 59 characters in body
Source Link
Michael Mrozek
  • 93.7k
  • 40
  • 240
  • 233

I am trying to cut shortshorten the findfind command, but getting an error.

praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ alias f='find . -name $1 -print' praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ f JobConf.java

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

find: paths must precede expression: JobConf.java Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] How can I make this work?

I am trying to cut short the find command, but getting an error.

praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ alias f='find . -name $1 -print' praveensripati@MyMini:~/Hadoop/Git/hadoop-common$ f JobConf.java

find: paths must precede expression: JobConf.java Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

I am trying to shorten the find command, but getting an error:

$ alias f='find . -name $1 -print'
$ f JobConf.java

find: paths must precede expression: JobConf.java
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

How can I make this work?

Source Link
Loading