#!/bin/bash if [ $# != 1 ] then echo usage libversionShow IOCNAME >&2 exit 1 fi IOC=$1 wget -q -O - "http://epics-boot-info.psi.ch/libinfo.ashx?ioc=$IOC&format=csv&separator= &header=no&limit=0" | \ awk ' BEGIN {RS="\r?\n"; i=1;} # wep page sends {l[i] = $2; v[i]=$3; d[i]=$4; if (length($2)>ll) {ll=length($2)}; if (length($3)>lv) {lv=length($3)}; i++ } END {for (i in l) { printf ("%-*s %-*s %s\n", ll, l[i], lv, v[i], d[i]) } } ' wget -q -O - "http://epics-boot-info.psi.ch/libinfo.ashx?libname=$1&format=csv&separator= &header=no&limit=0" | \ awk ' BEGIN {RS="\r?\n"; i=1;} # wep page sends {s[i] = $1; l[i] = $2; v[i]=$3; if (length($1)>ls) {ls=length($1)}; if(length($2)>ll) {ll=length($2)}; i++ } END {for (i in l) { printf ("%-*s %-*s %s\n", ls, s[i], ll, l[i], v[i]) } } ' # $Header: /cvs/G/EPICS/App/scripts/libversionShow,v 1.3 2017/06/27 09:52:21 zimoch Exp $