#!/bin/bash [ "$HOSTNAME" != lime2 ] || exit 1 for folder in ~/tssr/procedures/*; do if [ -d "$folder" ]; then name=$(basename "$folder") cp "$folder"/procedure*.pdf ./procedures-tssr/procedure_"$name".pdf fi done