Added function ldifparse

This commit is contained in:
Xavier Logerais (Numericable - Ingénierie Système) 2013-12-05 13:42:43 +01:00
parent 42e3a8e723
commit 31a25d6eeb

16
libs/ldif.bash Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
function ldifparse ()
{
awk 'length > 79 {
n=1
while ( length($0) > 78 + n ) {
printf "%s\n ", substr($0,1,78 + n)
$0 = substr($0,79 + n)
n=0
}
if (length) print
next
}
{print}' "$FILE"
}