Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ]; then
- blkid |sed -n 's/\(.*:\).* TYPE=\"\([^\"]*\)\".*/\1\2/p'
- else
- RES=`blkid "$1"`
- RC=$?
- if [ $RC -ne 0 ];then
- echo "$1:Not found or not supported (code $RC)"
- else
- RES=`echo "$RES"|sed -n 's/\(.*:\).* TYPE=\"\([^\"]*\)\".*/\1\2/p'`
- if [ -n "$RES" ];then
- echo "$RES"
- else
- echo "$1: Not exist TYPE"
- fi
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement