Separating complete blocks from leftover bytes

A transfer utility divides a 7865-byte payload into complete 1024-byte blocks and a final partial block. Evaluate the Bash expressions below. Enter full in complete blocks and remaining in bytes, both to zero decimal places.


Shell
payload=7865
block=1024
full=$((payload / block))
remaining=$((payload % block))
Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Bash Expressions Questions: