Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1611
  • Last Modified:

unix diff command that supports wildcard

Is there  a command simular to the "diff" command that supports wildcard?

example:
diff  /DIR1/xyz*    /DIR2/xyz*

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

0
waipahu
Asked:
waipahu
1 Solution
 
amit_gCommented:
for i in /DIR1/xyz*
do
    filename=`basename $i`
    echo "Checking $filename"
    diff  /DIR1/$filename    /DIR2/$filename
done
0
 
waipahuAuthor Commented:
You are master GURU!
Thanks!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now