check jar versions


/ Published in: Awk
Save to your folder(s)

This is some ugly-ass code, but it works to see if you need to update the atlassian jira jars. Meant to be in /opt/j2ee/domains/domainname.com/instance/tomcat/lib/newdir


Copy this code and paste it in your HTML
  1. for i in *.jar; do set -- `echo $i |awk -F- '{sub(/.jar/,"",$0)} {if ($2 !~ /[0-9]/) {print $1"-"$2,$3} else {print $1,$2} }'`;jarname=$1;newver=$2; set -- `ls ../*.jar |grep "$jarname-[0-9]" |awk -F- '{sub(/.jar/,"",$0)} {if ($2 !~ /[0-9]/) {print $3} else {print $2} }'`; if [ "$newver" != "$1" ]; then echo $jarname $newver $1; fi; done

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.