#!/bin/bash dirs=("/home/apps/chpc/bio" "/apps/chpc/bio") # Loop through and search for .sif files only in immediate subdirectories for dir in "${dirs[@]}"; do if [ -d "$dir" ]; then echo "Searching for .sif files under $dir (only first subfolder level):" find "$dir" -mindepth 2 -maxdepth 2 -type f -name "*.sif" -readable -exec ls -al {} \; 2>/dev/null else echo "Directory $dir does not exist." fi done