Skip to content

Instantly share code, notes, and snippets.

@fs111
Created July 12, 2012 10:18
Show Gist options
  • Save fs111/3097209 to your computer and use it in GitHub Desktop.
Save fs111/3097209 to your computer and use it in GitHub Desktop.
nexus commandline search
#!/bin/bash
# command line search script for nexus instances. Needs curl and xmlstarlet
# installed.
NEXUS_URL="http://nexus.example.com/nexus/service/local/lucene/search?q="
# make sure we got exactly one param
if [ ! $# -eq 1 ]
then
echo "usage nexus-search <term>"
exit 1
fi
curl -s $NEXUS_URL$1 | xmlstarlet sel -T -t -m /searchNGResponse/data/artifact \
-v "groupId" -o " "\
-v "artifactId" -o " " \
-v "version" -n
@lwiechec
Copy link

cool, exactly what I was looking for :) I will try to create awk script to convert this basic output to '...'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment