#!/bin/bash files=$(find /var/solr -name write.lock) if [ -n "$files" ]; then rm $files else echo "No files found." fi