I need to process a file with approximately 120k lines that has the following format using ksh:

```
"[UserId=USER1]";"Client=001";"Locked_Status=0";"TYPE=A";"Last_Logon=00000000";"Valid_To=99991231";"Password_Change=20120131";"Last_Password_Change=29990" 
"[UserId=USER2]";"Client=000";"Locked_Status=0";"TYPE=A";"Last_Logon=20141020";"Valid_To=00000000";"Password_Change=20140620";"Last_Password_Change=9501"
"[UserId=USER3]";"Client=002";"Locked_Status=0";"TYPE=A";"Last_Logon=00000000";"Valid_To=99991231";"Password_Change=20140304";"Last_Password_Change=9817"

```

The output should be something like:

```
[UserId=USER1] Client=001
Locked_Status=0
TYPE=A
Last_Logon=00000000
Valid_To=99991231
Password_Change=20120131
Last_Password_Change=29985
[UserId=USER2]
Client=000
Locked_Status=0
TYPE=A
Last_Logon=20141020
Valid_To=00000000
Password_Change=20140620
Last_Password_Change=9496
[UserId=User3]
Client=002
Locked_Status=0
TYPE=A
Last_Logon=00000000
Valid_To=99991231
Password_Change=20140304
Last_Password_Change=9812

```

I initially used the following code do process the file:

```
for a in $(<$1)
do
        a=$(echo $a|sed -e 's/;/ /g' -e 's/"//g')
        for b in $a
        do
                print $b
        done
done

```

It was taking around 3hrs to process 120k lines.
Then I tried to improved the code changing it to the following:

```
   for a in $(<$1)
   do
     printf "\n$(echo $a|sed -e 's/"//g' -e 's/;/\\n/g')"
   done

```

That gave me 2hrs processing time however it still takes too long to process 120k lines

At last I tried this code which processed the 120k lines in 3secs!

```
  perl -ne '
            chomp;
            s/\"//g;
            s/;/\n/g;
            print;
           ' <$1

```

Is there anyway I can improve the code in KSH to achieve similar performance? I believe that I must be missing something in my KSH code... Help me to find out please.

Thanks in advance