1 |
On Wednesday 01 July 2009 16:30:26 Peter Humphrey wrote: |
2 |
> Hello list, |
3 |
> |
4 |
> Can anyone explain this to me? |
5 |
> |
6 |
> $ /bin/grep -r hmenu *html |
7 |
> index.html: <div id="hmenu"> |
8 |
> master.html: <div id="hmenu"> |
9 |
> pictures.html: <div id="hmenu"> |
10 |
> |
11 |
> $ /bin/grep -r hmenu pages/*html |
12 |
> pages/community.html: <div id="hmenu"> |
13 |
> pages/contacts.html: <div id="hmenu"> |
14 |
> pages/history.html: <div id="hmenu"> |
15 |
> pages/music.html: <div id="hmenu"> |
16 |
> pages/news.html: <div id="hmenu"> |
17 |
> pages/people.html: <div id="hmenu"> |
18 |
> pages/pictures.html: <div id="hmenu"> |
19 |
> |
20 |
> Grep is clearly disobeying the recursion command. I started noticing this a |
21 |
> few days ago, and it's making maintenance of this directory hard work. |
22 |
|
23 |
You equally clearly do not understand how recursion works. You told it to grep |
24 |
through all the html files starting from pages/ and it did so. |
25 |
|
26 |
You did not tell it to start from pages/.. so why do you think it should do |
27 |
so? |
28 |
|
29 |
-- |
30 |
alan dot mckinnon at gmail dot com |