I was wondering if anyone knew or had an example code of how they make the loading spinning symbol I've seen on boot loaders and such where the keys go like this

| / - and repeat making it look like a spinning line.

I tried producing it with /b but it didn't work out to well I thought it was a neat effect I could use for some programs while waiting for them to load or do work and was hoping someone could help me out?