4cade/bin/padto

8 lines
149 B
Plaintext
Raw Normal View History

#!/bin/bash
totalsize=$1
outfile=$2
filesize=`stat -f "%z" "$outfile"`
padsize=$((512-$filesize))
dd if=/dev/zero bs=1 count=$padsize >> "$outfile"