Created
October 3, 2022 19:20
-
-
Save ThinGuy/29f199be0f66c4b6590be7e243810ab9 to your computer and use it in GitHub Desktop.
REGEX for Predictable Network Interface Device Names
This file contains hidden or 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
export PNID_REGEX=$(curl -fksSL https://raw.githubusercontent.com/systemd/systemd/main/src/udev/udev-builtin-net_id.c|grep -oPa '(?<=prefix = \x22)[^\x22]+'|sort -uV|paste -sd'|'|sed -r 's,l\|ww,[lw],g;s,^|$,\x27') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment