diff --git a/LDP/lampadas/database/tables/common.input b/LDP/lampadas/database/tables/common.input index 436d849a..a2a98070 100755 --- a/LDP/lampadas/database/tables/common.input +++ b/LDP/lampadas/database/tables/common.input @@ -1,2 +1,19 @@ #!/bin/sed -f + +# escape single unprotected quotes with a backslash s#\([^\\']\)'\([^']\)#\1''\2#g + +# trim leading white space +s#^[[:space:]]*## + +# trim trailing white space +s#[[:space:]]*$## + +# removing empty lines +/^$/d + +# join a trailing [ with the next line +/\[$/ { + N + s#\[[[:space:]]*#[# +}