Windows2003-3790/enduser/speech/setup_whistler/reg.awk

56 lines
878 B
Awk
Raw Normal View History

2001-01-01 00:00:00 +01:00
{
printf "HKLM,";
if (substr($2, 1, 19) == "HKEY_LOCAL_MACHINE\\")
{
$2 = substr($2, 20);
}
printf $2;
if (NF == 2)
{
print "\\,,,";
continue;
}
else if ( substr($3,1,2) == "@=" )
{
$3 = substr($3,4,length($3)-3);
start = 3;
printf ",,";
}
else
{
if (index($3, "=") == 0)
{
print "ERROR";
}
else
{
printf ","substr($3, 2, index($3, "=")-3)",";
$3 = substr($3, index($3, "=")+2);
}
start = 3;
}
for (i = start; i <= NF; i++)
{
if (i == start)
{
printf ",\"";
}
if (substr($i, length($i), 1)=="\"")
{
printf substr($i, 1, length($i)-1);
}
else
{
printf $i;
}
if (i < NF)
{
printf " ";
}
else
{
printf "\"";
}
}
print "";
}