Example conversion:
#individual page redirects
RedirectRule ^/default.php http://example.com [R=301]
Converts to:
<rule name="RULE_no1"><match url="^/default.php" /><action type="Redirect" redirectType="Permanent" url="http://example.com" /> </rule>
Script:
#!/bin/sh
awk 'BEGIN{OFS=""}/RedirectRule/{ print "<rule name=\"RULE_no",NR,"\"><match url=\"",$2,"\" /><action type=\"Redirect\" redirectType=\"Permanent\" url=\"",$3,"\" /> </rule> " }' $1