unix diff command that supports wildcard

Posted on 2007-07-20
Last Modified: 2013-12-20
Is there  a command simular to the "diff" command that supports wildcard?

diff  /DIR1/xyz*    /DIR2/xyz*

I want to check for all differences for all files that start with XYZ

Question by:waipahu
    LVL 58

    Accepted Solution

    for i in /DIR1/xyz*
        filename=`basename $i`
        echo "Checking $filename"
        diff  /DIR1/$filename    /DIR2/$filename

    Author Comment

    You are master GURU!

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    llcommand 6 70
    UNiX Script filesystem space usage 19 50
    firstChar challenge 13 57
    Image not there 4 10
    Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
    Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now