mirror of https://github.com/tLDP/LDP
Now does four additional things:
# trim leading white space # trim trailing white space # removing empty lines # join a trailing [ with the next line
This commit is contained in:
parent
f0f81ac376
commit
68fe133eb5
|
@ -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:]]*#[#
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue