Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Awk script needed to change alpha characters. 1

Status
Not open for further replies.

Dorga

MIS
Jul 30, 2003
101
NZ

I am in need of a script, awk or anything actually that will make output from WYEAAA to WYEZZZ
ie:
WYEAAA
WYEAAB
WYEAAC
...
WYEABA
WYEABB
WYEABC
...
WYEZZZ

As you see, the first three characters remain the same, the last three rotate in alpha from A-Z moving right to left as shown.. any ideas would be greatfull.
 
Try this

BEGIN {
split("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",a)
for (j1=1;j1<=26;j1++) {
for (j2=1;j2<=26;j2++) {
for (j3=1;j3<=26;j3++) {
print &quot;WYE&quot; a[j1] a[j2] a[j3]
}
}
}
exit
}

CaKiwi

&quot;I love mankind, it's people I can't stand&quot; - Linus Van Pelt
 
CaKiwi,

Thank you very much. The script worked exactly as I needed!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top