For FreeBSD and Linux use awk's toupper() function.

Suggested by:	ed
This commit is contained in:
Pawel Jakub Dawidek 2010-08-06 21:53:50 +00:00
parent f7bfc405c7
commit 520fad0247

View File

@ -9,7 +9,7 @@ FreeBSD|Darwin)
GREP=grep
#fs=`df -T . | tail -1 | awk '{print $2}'`
pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}' | tr '[:lower:]' '[:upper:]'`
fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print toupper($2)}'`
;;
Solaris|SunOS)
GREP=ggrep
@ -19,7 +19,7 @@ Solaris|SunOS)
;;
Linux)
GREP=grep
fs=`df -PT . | tail -1 | awk '{print $2}' | tr '[:lower:]' '[:upper:]'`
fs=`df -PT . | tail -1 | awk '{print toupper($2)}'`
;;
*)
echo "Unsupported operating system ${os}." >/dev/stderr