I’m looking for a way (using standard command) to find a file that is in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
Do you want to start it in the next directory up or do you really want to
find a file above you by any means necessary? “find / -name file” will start
the search for file in the root of the filesystem no matter where you are
but I’m sure that’s not what you mean.
I’m looking for a way (using standard command) to find a file that is in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
I don’t know of a way to do it with a single command, but it’s pretty
easy with a shell script. Edit “/usr/bin/addvariant” and look for the
line “find the directory containing common.mk”.
Do you want to start it in the next directory up or do you really want to
find a file above you by any means necessary?
Above the current level.
“find / -name file” will start
the search for file in the root of the filesystem no matter where you are
but I’m sure that’s not what you mean.
No that wouldn’t work cause it may find multiple instance of the file
I’m looking for. I’m very surprise “find” doesn’t have an option
to search backward.
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
I’m looking for a way (using standard command) to find a file that is in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
I don’t know of a way to do it with a single command, but it’s pretty
easy with a shell script. Edit “/usr/bin/addvariant” and look for the
line “find the directory containing common.mk”.
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rrqat$e3p$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
I’m looking for a way (using standard command) to find a file that is
in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
I don’t know of a way to do it with a single command, but it’s pretty
easy with a shell script. Edit “/usr/bin/addvariant” and look for the
line “find the directory containing common.mk”.
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rrqat$e3p$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
I’m looking for a way (using standard command) to find a file that
is
in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
I don’t know of a way to do it with a single command, but it’s pretty
easy with a shell script. Edit “/usr/bin/addvariant” and look for the
line “find the directory containing common.mk”.
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
Using “;” to put multiple commands on one line, you should be able to hack
that together.
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
Using “;” to put multiple commands on one line, you should be able to hack
that together.
“Bill Caroselli” <> qtps@earthlink.net> > wrote in message
news:9rrtec$icv$> 1@inn.qnx.com> …
Perhaps I’m missing something but can’t you just do:
find … [rest of your filters]
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rrqat$e3p$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
I’m looking for a way (using standard command) to find a file that
is
in
a directory up from the search location. The find command would
work fine, but I cannot find an option to get it to scan in the
upward direction in the directory tree. It only goes downward
in deeper level of directory.
I don’t know of a way to do it with a single command, but it’s
pretty
easy with a shell script. Edit “/usr/bin/addvariant” and look for
the
line “find the directory containing common.mk”.
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid
the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rs096$hu5$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
Using “;” to put multiple commands on one line, you should be able to hack
that together.
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rs096$hu5$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
Using “;” to put multiple commands on one line, you should be able to hack
that together.
“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:9rs096$hu5$> 1@nntp.qnx.com> …
Mario Charest <> mcharest@clipzinformatic.com> > wrote:
That’s exaclty what I want to do. Problem is I want
to run this from a Makefile $(shell). I would really want to avoid the
need
for an external script/program. As of now I’ve written a program
that does it but it has to be available in the user’s path.
I want to avoid this requirement.
Using “;” to put multiple commands on one line, you should be able to hack
that together.