Script to generate passwd comb.

Hi
I created a gnupg password which I later forgot clumsy enough (after a holiday). I can always create a new one but unfortunately I have some files on the computer that I encrypted with it and would like to access it. I remember parts of the password and was wondering what's the the best way to guess the password.

The password was in the format:

Abc1_EFG,HIJ,klm1

obs. klm1 (K L M "ONE")

now:
1st I remember "Abcd_" but "b" "c" and "1" may be in different order.

2nd As for ",EFG" (only letters, uppercase). I remember the "E" and want to guess what "F" and "G" can be (for example script to try different combinations), have my suspicions, however ...

3rd As for ",HIJ" (only letters, uppercase). I want the script tries different combinations of letters (CAPS)

4th As for ",klm1". I remember all the characters but one may be in a different order. All chars lower case

Is it possible that from these "criteria" write a script that generates different combination of passwords and try to decrypt a file with a command?

command to try different passwords script generates is:

echo $mypass | gpg --batch --passphrase-fd 0 --decrypt $1

$mypass is the variable that will holds the combinations

EDIT: gpg gives 2 as return value when the pass is wrong. So I guess I should use a while [ $? = 2 ] or something?