#!/bin/bash COLLECTION=${2:-zylk} SERVER=${3:-localhost} PORT=${4:-8983} if [ -z "$1" ]; then # Usage echo 'Usage: add-by-id.sh [ ]' else curl -X POST "http://${SERVER}:${PORT}/solr/${COLLECTION}/update?commit=true" -H "Content-Type: text/xml" --data-binary "$1$1" fi