
ianilkumar
Novice
Nov 16, 2012, 9:57 AM
Post #1 of 4
(710 views)
|
|
find with in a perl script behaves stragely
|
Can't Post
|
|
Trying to use the output of a find command in a perl script: my @pin_conf_files = `find . -name "create*.opc" -exec grep -l PIN_FLD_PASSWD {} \;`; foreach my $file(@pin_conf_files) { chomp($file); open (FILE,"<$file"); while (<FILE>) { chomp; if ($_ =~ m/(\d\s+PIN_FLD_PASSWD_CLEAR\s+/[0/]\s+)(.*)$/g) print $file; } close FILE; } #} But it returns an error as find: missing argument to `-exec' It works fine on the command line.
|