perl -p0e 's/\n^$|^dn:.*\n//mg; s/cn: //g; s/\norclnetdescstring: /=/g' #### Newline removed after, not before | | | | v v 's/\n^$|\n^dn:*$//mg','s/cn: //g','s/\norclnetdescstring: /=/g' 's/\n^$|^dn:.*\n//mg; s/cn: //g; s/\norclnetdescstring: /=/g ^ ^ | | Missing | dot Optional: no need to switch between Perl and shell, using semicolons instead of commas. #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,