I want to create a file of a specific size containing only printable strings in bash.
My first thought was to use /dev/urandom:
/dev/urandom
dd if=/d
Based on your request, using string on urandom
string
urandom
dd if=<(strings
.. or even
dd bs=4K count=25600 if=/dev/urandom | tr \\000-\\037\\200-\\377 \\040-\\077\\040-\\077\\040-\\140 >/tmp/file