Created
October 19, 2012 16:14
-
-
Save brookemckim/3919117 to your computer and use it in GitHub Desktop.
Remove all volume groups
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
volume_groups=$(vgdisplay | grep "VG Name" | awk '{print $3}') | |
for g in $volume_groups; do | |
vgremove --force $g | |
done |
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
volume_groups=$(vgdisplay | grep 'VG Name' | grep -o '[a-zA-Z0-9]\{1,\}$') | |
for g in $volume_groups; do | |
vgremove --force $g | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment