bash return just the device label?
by babag from LinuxQuestions.org on (#6PDG0)
everything i've found in searching returns extraneous info like the column name and such. tried ls, lsblk, blkid and haven't been able to figure out how to give a device, like sdc1, and return just the label for that partition (or device). i know it must be simple but i haven't been able to find it.
here's an example:Code:lsblk /dev/sdc1 -o LABEL
LABEL
FILMSCLEANi just want 'FILMSCLEAN'
thanks,
babag
here's an example:Code:lsblk /dev/sdc1 -o LABEL
LABEL
FILMSCLEANi just want 'FILMSCLEAN'
thanks,
babag