I am trying to make a bash script to automate the dd
command. How can I get the label of a partition without having to slice the output of blkid
?
I figured out that you can make blkid
output just the raw values and just grep for the label using a keyword. blkid -o value /dev/sr0 | grep "keywordhere"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.