$ find . -name pom.xml -type f -exec perl -ne 'BEGIN {my $l} if (/2.0.1.RELEASE/) { printf "%s%s",$last,$_ ; $l=$last } ; $last=$_; END { exit 1 unless $l; }' {} \; -printfmon-jms 2.0.1.RELEASE ./master-service/master-service/master-proc/master-proc-core/pom.xml
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Tuesday, October 2, 2012
using find and report on several lines with grep like functionality
Oneliner for finding a specific release of an artifact in a maven build file and reporting the artifact name and version even though these pieces are in different lines... And using find with the exit to print out only the successful files.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment