Last active
June 13, 2018 13:15
-
-
Save yousan/89ad909d6cf0fc9cd5ee168251b6aa2f to your computer and use it in GitHub Desktop.
uuid to fstab
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
#!/bin/bash | |
# UUID=1234-37bd-4098-9f8b-85e99c9c5219 /boot xfs defaults 0 0 | |
blkid | grep $1 | sed -r 's#^.*UUID="([a-Z0-9\-]+)".*TYPE="([a-Z0-9\-]+)".*$#UUID=\1\t'$2'\t\2\tdefaults\t0\t0#' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment