Hi,
I store the SQL script for a particular release in a subdirectory of 'scripts' named after the release version, e.g.
...
./scripts/1.8.3/script-1.8.3.sql
./scripts/1.8.4/script-1.8.4.sql
./scripts/1.8.4.1/script-1.8.4.1.sql
./scripts/1.8.4.2/script-1.8.4.2.sql
./scripts/1.8.4.3/script-1.8.4.3.sql
./scripts/1.9.0/script-1.9.0.sql
./scripts/1.9.1/script-1.9.1.sql
./scripts/1.9.2/script-1.9.2.sql
./scripts/1.9.3/script-1.9.3.sql
./scripts/1.9.4/script-1.9.4.sql
./scripts/1.9.5/script-1.9.5.sql
./scripts/1.9.6/script-1.9.6.sql
./scripts/1.9.6.1/script-1.9.6.1.sql
...
In a bash script, I need to get all the SQL files that apply beyond a certain version number. For example if this version number is 1.9.4 I would like to get the list
./scripts/1.9.4/script-1.9.4.sql
./scripts/1.9.5/script-1.9.5.sql
./scripts/1.9.6/script-1.9.6.sql
./scripts/1.9.6.1/script-1.9.6.1.sql
...
I know I can get the entire list of files ordered by release via
all_files = `find . -name '*.sql' | sort`
But I'm not sure how I can filter this list to get all files "on or after" a particular version.
Thanks, Don