corrects gnu version of stat

This commit is contained in:
Tilde Black Admin 2020-06-11 00:48:12 +00:00
parent b05cd9d821
commit bc7406fbea
1 changed files with 2 additions and 2 deletions

4
tilde
View File

@ -26,12 +26,12 @@ VERSION="0.0.1"
if stat -c"%U" /dev/null >/dev/null 2>/dev/null ; then
# GNU environment
stat_func () {
stat -f %Su "$1"
stat -c '%U' "$1"
}
else
# BSD environment
stat_func () {
stat "$1" | awk '{print $5}'
stat -f %Su "$1"
}
fi