Project

General

Profile

1 4906 daigle
#!/bin/bash
2
3
#############################################################################
4
# Create dictionary files of five letter words with every possible combination
5
# of letters.  Each file is named dictionary-X.txt where X is each letter of
6
# the alphabet and the file holds all possible words that start with that
7
# letter.
8
#
9
# 6 April 2009 Michael Daigle (daigle@nceas.ucsb.edu)
10
#############################################################################
11
12
ltr=(a b c d e f g h i j k l m n o p q r s t u v w x y z)
13
14
> ./dictionary2.txt
15
16
for i in {0..25}
17
do
18
	for j in {0..25}
19
	do
20
		for k in {0..25}
21
		do
22
			for l in {0..25}
23
			do
24
				for m in {0..25}
25
				do
26
					echo ${ltr[$i]}${ltr[$j]}${ltr[$k]}${ltr[$l]}${ltr[$m]} >> ./dictionary-${ltr[$i]}.txt
27
				done
28
			done
29
		done
30
	done
31
done