#!/bin/sh s=" " # field separator exec 2>/dev/null filename=$(basename -- "$4") filesize=$(du -Hh -- "$4" | cut -f 1) echo "${filesize}${s}${filename}"