Contact Info

sean [at] coreitpro [dot] com gpg key

Mastodon

sc68cal on Libera

Finding infinite loops

I have a java program that loads up a bunch of numbers from a file. I figured that it’d be smart to put a few values in, but I was too lazy to even use copy and paste multiple times.

Remembering a neat trick in UNIX, I decided to drop down to the shell and do the following:

cat charfile >> charfile

What does this mean? I took the contents of the file and appended it to the end of itself. What I didn’t realize is that it would keep going forever! Whoops!