Hey guys, I have two scripts that are written in perl and I wan't to know if there is a way to get them put into a dos batch file instead of having to run on a linux box. Here is the first one, I noticed that it uses awk which I believe there might be a windos version of that out these days. My main concern is that the second part that gets called "it.revs" won't be able to be put into a batch file because of the syntax it uses. Thanks for any input or options. Also is it possible to just run a perl script on a windows box with a perl compiler or interperter or something like that?
#!/bin/sh
cd /home/revs
smbmount //bnhcfs/revs /mnt/revs -o username=****
rm /mnt/revs/LIST*
awk -f it.revs /mnt/revs/REV_CHK.txt
smbumount /mnt/revs
now here is the it.revs file that awk calls
{
if ( $1 ~ /^[0-9]/ ) {
FIRST = substr($1,1,3)
SECOND = substr($1,5,2)
THIRD = substr($1,8,4)
MEMBER = FIRST SECOND THIRD
MONTH = substr($2,1,2)
DAY = substr($2,4,2)
YEAR = 20 substr($2,7,2)
DATE = YEAR MONTH DAY
printf("%381s%9s%32s%8s%41s\r\n","ISA*03*USERID *01*PASSW0RD *ZZ*1309927 *ZZ*PC-WEB *030521*1614*U*00401*000000905*1*P*:~GS*HS*USERID*MASS XIX DMA*20030521*1614*1*X*004010X092A1~ST*270*0001~BHT*0022*13*REPW*20030521*1614~HL*1**20*1~NM1*PR*2*MASSACHUSETTS MEDICAID*****PI*MASS XIX DMA~HL*2*1*21*1~NM1*1P*2******SV*1309927~REF*JD*USERID~REF*EL*PCX022200022P~HL*3*2*22*0~NM1*IL*1*XXXXXXXXXX*X****MI*", MEMBER, "~REF*GH*000000000001~DTP*307*D8*", DATE, "~EQ*30~SE*14*0001~GE*1*1~IEA*1*000000905~") > "/mnt/revs/LIST" MONTH DAY ".txt"
}
}
THANKS!