#!/bin/bash shopt -s extglob directory=`pwd` read -p "Clearing case. Are you sure? (y/N) " -n 1 -r echo ' ' if ! [[ $REPLY =~ ^[Yy]$ ]] then exit fi if [ -d "./constant/polyMesh" ]; then cd ./constant/polyMesh rm -fr !(blockMeshDict) cd $directory fi rm -fr *[0-9].[0-9]* [0-9] [1-9]* gaugesVOF gaugesP postProcessing processor* rm -f *.log #rm -f constant/turbulenceProperties