Created
February 5, 2018 15:18
-
-
Save kawaii/ecb4cdbedc73568d2b1487ed3c31e615 to your computer and use it in GitHub Desktop.
List of Perl one-liners for doing various things.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change home directories to UIDs in an LDIF file | |
perl -0777 -p -i.bak -e's{homeDirectory: .+?$(.*?uidNumber: (\d+))}{homeDirectory: /home/$2$1}msg' ou-test.ldif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment