Created
August 23, 2019 20:29
-
-
Save jongillies/5ffe878c2baf0e992b41ad3defeae092 to your computer and use it in GitHub Desktop.
Regex Majic
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
#!/usr/bin/env bash | |
cat << EOF > grub.orig.conf | |
# If you change this file, run 'update-grub' afterwards to update | |
GRUB_DEFAULT=0 | |
GRUB_TIMEOUT_STYLE=hidden | |
GRUB_TIMEOUT=0 | |
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet" | |
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 " | |
# Uncomment to enable BadRAM filtering, modify to suit your needs | |
EOF | |
cat << EOF | |
Objective-> Using the created file grub.orig.conf, create a regex inline replace to meet the following: | |
Make the line: | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet" | |
be: | |
GRUB_CMDLINE_LINUX_DEFAULT="quiet ipv6.disable=1" | |
And: | |
Make the line: | |
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 " | |
be: | |
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 ipv6.disable=1" | |
EOF | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment