config-bash/libs/ldif.bash
Xavier Logerais (Numericable - Ingénierie Système) 31a25d6eeb Added function ldifparse
2013-12-05 13:42:43 +01:00

17 lines
216 B
Bash

#!/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"
}