From edf1ec190d2125ac5dbdd38635bc0b09f6c71033 Mon Sep 17 00:00:00 2001 From: Lukas Oertel Date: Sun, 22 Jan 2023 17:18:08 +0100 Subject: Remove whitespace from previous commit bff3b4c9d4ea892ec1255dfe479b13b2fa5b0f92 --- scripts/ldap-uid_cn_mail-as_csv/ldap-uid_cn_mail-as_csv.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'scripts/ldap-uid_cn_mail-as_csv') diff --git a/scripts/ldap-uid_cn_mail-as_csv/ldap-uid_cn_mail-as_csv.sh b/scripts/ldap-uid_cn_mail-as_csv/ldap-uid_cn_mail-as_csv.sh index ce6cb8f..cea44b1 100644 --- a/scripts/ldap-uid_cn_mail-as_csv/ldap-uid_cn_mail-as_csv.sh +++ b/scripts/ldap-uid_cn_mail-as_csv/ldap-uid_cn_mail-as_csv.sh @@ -27,11 +27,11 @@ split -l 3 $RND_FOLDER/ldap.txt $RND_FOLDER/ldap.txt.chunk. ls $RND_FOLDER/ldap.txt.chunk.* | xargs -P 4 -I {} sort {} -o {} cat $RND_FOLDER/ldap.txt.chunk.* > $RND_FOLDER/ldap.txt.sorted - cat $RND_FOLDER/ldap.txt.sorted | \ - # Split every 3 lines and make CSV file from data - xargs -n3 -d'\n' | \ - sed 's/cn: //g; s/ mail: /,/g; s/ uid: /,/g' | \ - # Quote columns with spaces correctly - sed 's/^/"/g; s/,/",/1' | sed 's/""/"/g' > ldapdata.csv +cat $RND_FOLDER/ldap.txt.sorted | \ +# Split every 3 lines and make CSV file from data +xargs -n3 -d'\n' | \ +sed 's/cn: //g; s/ mail: /,/g; s/ uid: /,/g' | \ +# Quote columns with spaces correctly +sed 's/^/"/g; s/,/",/1' | sed 's/""/"/g' > ldapdata.csv rm -r $RND_FOLDER -- cgit v1.2.3