1
0
Fork 0
oldhaven/php/pgadmin/lang/convert.awk

19 lines
442 B
Awk
Executable File

#!/usr/bin/awk -f
#
# Script contains all needed conversions of recoded text
#
# Remove everything before first "<?php"
BEGIN { while (index($0,"&lt;?php")==0) { getline; continue }
print "<?php";
}
# Remove everything after first "?>"
# (as there should be only one occurance, thats no problem)
/\?\&gt;/ { print "?>"; exit }
{
# Convert CRLF -> LF (== "remove CR" ) ;-)
gsub("&#13;","");
gsub("&apos;","'");
print $0
}