04 February 2018

Randomized addition worksheets for kiddos using Bash Pipelines

Following up on a prior randomized worksheet for reading, here's a way to generate as many simple addition worksheets as you care to print:

#!/bin/bash
# Print a US letter page of addition problems using numbers 0 through 10.
(
    for i in $(seq 1 26); do
        printf "%2d %s %2d = \n" "$((RANDOM % 11))" "+" "$((RANDOM % 11))"
    done
) \
| column -nxc 36 \
| sed G \
| head -n -1 \
| a2ps -1 --chars-per-line=32 --no-header --borders=no

21 comments:

rakibhr said...
This comment has been removed by a blog administrator.
rakibhr said...
This comment has been removed by a blog administrator.
rakibhr said...
This comment has been removed by a blog administrator.
John lee said...
This comment has been removed by a blog administrator.
thenortonsetup.com said...
This comment has been removed by a blog administrator.
Tim Lee said...
This comment has been removed by a blog administrator.
wwwnortoncomsetup.com said...
This comment has been removed by a blog administrator.
Mcafee Antivirus Setup said...
This comment has been removed by a blog administrator.
Norton Setup said...
This comment has been removed by a blog administrator.
Norton Setup said...
This comment has been removed by a blog administrator.
Easy to Fix Office Setup said...
This comment has been removed by a blog administrator.
McAfee-Antivirus All Protection Solution said...
This comment has been removed by a blog administrator.
antivirusguard said...
This comment has been removed by a blog administrator.
McAfee-Antivirus All Protection Solution said...
This comment has been removed by a blog administrator.
Quickbooks Phone Number said...
This comment has been removed by a blog administrator.
Mcafee activate protection said...
This comment has been removed by a blog administrator.
How to protect your system said...
This comment has been removed by a blog administrator.
Quickbooks Phone Number said...
This comment has been removed by a blog administrator.
Asfera Technologies said...
This comment has been removed by the author.
Bitcoin Login said...
This comment has been removed by a blog administrator.
HRMS Telangana said...

Wow! Such an amazing and helpful post this is. I really love it. It's so good and so awesome.

Subscribe Subscribe to The Return of Agent Zlerich