19 lines
442 B
Awk
Executable File
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,"<?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
|
|
}
|