#!/bin/bash echo -e "\e[97mDummy file builder / calculator v2.0:\e[0m\e[24m" function help_ { echo -e "\nUsage $0 bios_size chip_size\n" } if [ -x $1 ] |[ -x $2 ] then help_ exit 0 fi result=$[$2-$1] echo -e "Dummy image size : $result B" dd if=/dev/zero of=dummy.bin bs=$result count=1 status=none echo "dummy.bin was generated"