r/tinycode • • May 05 '24

Matrix Digital Rain & Implementation In Under 20 LOC in pure Bash

Post image
20 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/wick3dr0se May 06 '24

That is a good idea and may be more performant for the main loop actually but I also use sleep in the C style for loop, where I iterate through terminal lines. I could use a bunch of pure Bash microsleeps (:;:) because I believe they are dependent on CPU and not like 0.1s or some set value

1

u/cowbaymoo May 06 '24 edited May 09 '24

maybe you can try: read -rst "0.$dropSpeed" < /dev/zero