Reputation: 277
I have groovy script which list filenames based on argument passed.
And I want to list filename containing b so, I'm providing filename in regex pattern as argument like: (*.)b(*.).*
But while running the command I'm getting: -bash: syntax error near unexpected token `('
Upvotes: 0
Views: 2529
Reputation: 28564
new File("./folder/to/scan").eachFileMatch( ~/.*b.*/ ){file->
println file
}
Upvotes: 1