Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (17 sloc) 374 Bytes
#!/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
You can’t perform that action at this time.