#!/bin/bash for file in deploy_*.php; do if [ -f "$file" ]; then echo -e "Making sum file for: $file \r\n" # Remove "deploy_" from the beginning and ".php" from the end new_file_name=$(echo "$file" | sed 's/^deploy_//;s/\.php$//') php -c /opt/neatoDeployments/neatoDeploy.ini -f /opt/neatoDeployments/neatoDeploy.phar "$new_file_name" -marksafe -skipdeploy fi done