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