From af046f01f8350f1bc9e585656cb56f3508a65d7f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 29 Jan 2019 16:46:15 +0100 Subject: Make getting the size platform dependent --- makecolumns.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/makecolumns.sh b/makecolumns.sh index b73dffe..b15a2dd 100755 --- a/makecolumns.sh +++ b/makecolumns.sh @@ -82,7 +82,10 @@ do_processfile_version_3() { } size() { - stat -f %z `printf %0${filename_len}d "$1"` +case `uname -s` in + *BSD|Darwin) stat -f %z `printf %0${filename_len}d "$1"`;; + *) stat -c %s `printf %0${filename_len}d "$1"`;; +esac } get_dword() { -- cgit v1.2.3