centosのpythonが2.4でtailの+2とかが使えないなんて…… #!/bin/bash URL=$1 XPATH=$2 if [ "$XPATH" == "" ]; then echo "XPATH 解析。引数 [URL] [XPATH]" exit -1 fi XML=$(mktemp) || exit -1 curl -s $DOCUMENT > $XML echo "cat ${XPATH}"| xmllint --shell $XML |awk '{if(n>1){print t} t=$1;n++}' rm $XML xpath.sh http://example.com/hudson/job/hogebuild/lastSuccessfulBuild/api/xml "//revision/revision/text()" とかする 複数の値があると ----- み