M DXYZ
asked on
Need help creating a bash script that will check for a label in a partition
Hi I need help creating a script that will check if a label exists with the e2label command, if it exists it would say label exists if it does not it will echo it does not exist.
After that if the label exists it would mount the label to a mount point cd to it and execute an script, after that it would resume back to the main script, and if it does not exist it would continue running the main script
e2label /dev/hdb3 | grep -i smb
I would appreciate your help.
Michael
After that if the label exists it would mount the label to a mount point cd to it and execute an script, after that it would resume back to the main script, and if it does not exist it would continue running the main script
e2label /dev/hdb3 | grep -i smb
I would appreciate your help.
Michael
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER