Skip to content

Instantly share code, notes, and snippets.

@yousan
Last active June 13, 2018 13:15
Show Gist options
  • Save yousan/89ad909d6cf0fc9cd5ee168251b6aa2f to your computer and use it in GitHub Desktop.
Save yousan/89ad909d6cf0fc9cd5ee168251b6aa2f to your computer and use it in GitHub Desktop.
uuid to fstab
#!/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