Thread: Grep
View Single Post
Posts: 631 | Thanked: 837 times | Joined on May 2007 @ Milton, Ontario, Canada
#9
I ran into the Grep -e problem when trying to compile PHP and Lighttpd for my device last week. It's actually an extremely easy problem to fix as long as you realize how BusyBox works.

Essentially busyBox is just one giant binary, containing a bunch of applications; it knows which application to run based on which command line argument you give it. Thus, to get different commands (i.e. grep, find, etc), there are symbolic links that point to the busybox binary; busybox reads the name of the link that called it, and executes the appropriate in-built application.

Okay, so what does this mean really? To install a new version of grep, you don't have to remove busybox, or even over-write it/etc in any way shape or form: simply remove the symbolic link, and replace it with your proper grep binary. I downloaded the source for Grep 2.5.1 from the gnu repository, and just did a ./configure, make, make install on the tablet. From then on, no worries!
Although be careful, for some idiotic reason the latest grep (2.5.5 or something) requires the latest version of grep to build, so it's impossible! lol that's why I chose 2.5.1
 

The Following User Says Thank You to jolouis For This Useful Post: