Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
well, here's one way. I rewrote your alias a little bit to grep all of the php files in and below the current directory, but you'll get the idea, i hope
Code:
alias localfind=_localfind
function _localfind
{
find . -name "*.php" -print | xargs grep $1 | more
}
Ahem. In the online documentation for Bash at the
gnu.org site --the horse's mouth, if you will,
see here
you will find this statement:
Quote:
There is no mechanism for using arguments
in the replacement text, as in csh. If arguments
are needed, a shell function should be used (see
section 3.3 Shell Functions).
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
I think i was mixed up and just thinking about bash
scripts, and got aliases mixed up.
yea, the alias just substitutes the command.
bash carries the variables.
I looked at that 3 times today, and just thought you
were being snooty, but i was just mixed up. It took
me 3 times to realize it.
Whansard, I certainly was not trying to be snooty.
I noticed an error in your post so I thought that
it would be a better thing to offer a correction
with a cited reference than it would be to let
that error mislead others.
I have been programming for a quite some time now
and I've made my fair share of mistakes --some of
them were real whoppers, too-- so, believe me, I
know how it happens.
Thanks everyone. Hey leed_25 I want to get a good book on linux programming. I'm not a newbie programmer (It was my concentration in college) but I would like a book that is pretty easy to understand. God knows I had some programming books in college that were so confusing I just used them as kindling for the fire. Any suggestions?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.