Comparing two lists from "find" and excluding matches

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • C++ Newbie

    Comparing two lists from "find" and excluding matches

    I want to recursively search for subdirectories containing filename1
    only, but not filename1 & filename2.

    I tried using the following csh command but it doesn't work:

    find ./ -name d3hsp | sed 's/filename1//' | grep -v `find ./ -name
    d3kil | sed 's/filename2//'`

    Any suggestions?

    Thanks.
  • Richard Herring

    #2
    Re: Comparing two lists from "find&quot ; and excluding matches

    In message
    <2b9e162c-4aad-401d-a7b7-609774a63aed@64 g2000hsm.google groups.com>, C++
    Newbie <newbie.cpp@goo glemail.comwrit es
    >I want to recursively search for subdirectories containing filename1
    >only, but not filename1 & filename2.
    >
    >I tried using the following csh command but it doesn't work:
    >
    >find ./ -name d3hsp | sed 's/filename1//' | grep -v `find ./ -name
    >d3kil | sed 's/filename2//'`
    >
    >Any suggestions?
    Ask in a Unix newsgroup?

    --
    Richard Herring

    Comment

    Working...