grep -R doesn’t search amazon

Towards the end of last month, following the release of the unity lens in ubuntu which searches amazon, “akeane” posted a bug report on launchpad complaining that “grep -R doesn’t automatically search amazon”. In his first posting he said:

Dear “root owning” overlords,

When using grep recursively I only get local results:

grep -R fish_t /home/noob/fish_game/*

/home/noob/fish_game/fish.h: struct fish_t { /home/noob/fish_game/fish.c: struct fish_t eric_the_ fish;

or worse:

grep -R shark_t /home/noob/fish_game/*/home/noob/fish_game/fish.h: struct shark_t { /home/noob/fish_game/fish.c: struct

shark_t_t mark_sw;

I declare this a bug for two reasons:

1. The output is boring.

2. The terminal has more than 2 lines!!! It’s an unefficient use of my screenspace.

I believe the reason for this is that the grep command only searches locally for things I am actually looking for, I kind of

expect the results I get from my codebase and as such it removes any sense of mystery or something new and exciting to

spice up my dull geek existence. That’s boring, grep -R should also search amazon, so I get more exciting results such as:

Shark Season 1 Starring Steven Eckholdt, Nora Dunn, Patrick Fabian, et al.

Amazon Instant Video to buy episodes: $1.99 to buy season: $34.99 ($1.59 per episode)

This bug report has been added to over the past few weeks, particularly after a reference was posted to reddit. As at today’s date, the bug is reported to “affect 169 people”.

The main thrust of akeane’s complaint is that the command line is lacking functionality available in the GUI. He finds that annoying and others agree. On 21 October, “rupa” wrote

I’ve been following this bug with some interest. A lot of good ideas here, but there are some technical issues that haven’t

been addressed.

Until all the common unix utilities can be upgraded to be affiliate-aware, common pipe operations might suffer from related

amazon results. if you pipe grep into awk for example, without being able to be sure of the results, things can get messy.

I feel this issue can be solved by introducing a new ‘default’ file descriptor. In addition to ‘stdout’ and ‘stderr’, I propose a

‘stdaffiliate’ file descriptor, and amazon results can go there. This would allow us to see relevant results in the terminal, but

keep them out of pipes unless purposely redirected.

Here I must disagree. In my view, all amazon (or related adware) results should be piped directly to /dev/null. Of course, stdaffiliate could be linked directly to /dev/null and all would be well.

Permanent link to this article: https://baldric.net/2012/10/20/grep-r-doesnt-search-amazon/

2 comments

    • Peter on 2012/10/23 at 10:50 am

    The clear humour aside, I’m waiting for a Human Rights version that immediately reports a developer or distro developer to the nearest Data Protection officials when they make deals like that. Why wait until someone complains?

    • Mick on 2012/10/23 at 11:01 am
      Author

    Humour? What humour? This is serious. A critical bug. It should be marked as so, but the devs keep marking it as “opinion – invalid”.

    Mick

Comments have been disabled.