First, I'd suggest you use File::Find instead of invoking find through the shell. Next, there's a nice tool that comes with File::Find that will translate the find command into the equivalent perl code, which you can then modify to do what you like, like so:
$ find2perl ./bin \( ! -name files_36 -prune \) -name "*fiPL.csv*" -pr +int #! /usr/bin/perl -w eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0; #$running_under_some_shell use strict; use File::Find (); # Set the variable $File::Find::dont_use_nlink if you're using AFS, # since AFS cheats. # for the convenience of &wanted calls, including -eval statements: use vars qw/*name *dir *prune/; *name = *File::Find::name; *dir = *File::Find::dir; *prune = *File::Find::prune; sub wanted; # Traverse desired filesystems File::Find::find({wanted => \&wanted}, './bin'); exit; sub wanted { my ($dev,$ino,$mode,$nlink,$uid,$gid); ( (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && ! /^files_36\z/s && ($File::Find::prune = 1) ) && /^.*fiPL\.csv.*\z/s && print("$name\n"); }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Backtick Query
by roboticus
in thread Backtick Query
by kevictor83
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |