Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Finding directory paths for missing objs

by Khen1950fx (Canon)
on Mar 13, 2011 at 05:10 UTC ( [id://892899]=note: print w/replies, xml ) Need Help??


in reply to Finding directory paths for missing objs

I tried this:
#!/usr/bin/perl use strict; use warnings; use File::Util; use File::Spec; my @dirs = shift @ARGV; my($f) = File::Util->new(); (@dirs) = $f->list_dir( @dirs, '--dirs-only', '--no-fsdots', '--with-paths'); foreach my $dir(@dirs) { foreach ($dir) { my (@ext) = ('*.so', '*.o', '*.a'); my $path = File::Spec->catfile($dir, "*.@ext") . "\n"; if (not glob($path)) { print "No @ext in $dir\n"; } else { print "OK\n"; } } }
Update: replaced if ($dir) with foreach ($dir)

Replies are listed 'Best First'.
Re^2: Finding directory paths for missing objs
by Anonymous Monk on Mar 13, 2011 at 06:17 UTC

    i need to search 1. recursively and 2.i only want to search in directories that end with "o-le-v7,o-le-v7-g,a-le-v7,a-le-v7-g"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://892899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found