From 68fe133eb5830ab6a03f02ae6f7bebf0d4f9cc9d Mon Sep 17 00:00:00 2001 From: alba <> Date: Thu, 11 Jul 2002 21:43:00 +0000 Subject: [PATCH] Now does four additional things: # trim leading white space # trim trailing white space # removing empty lines # join a trailing [ with the next line --- LDP/lampadas/database/tables/common.input | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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:]]*#[# +}