Topic: A neat trick I didn't know
I suspect everyone else knew this one, but it was quite handy for me.
We had to rename a bunch of JPG files to jpg. There were some errors. Some experimenting and a lucky guess made me realize that someone had created a few files with a name like style111.jpg<space>. That is, before saving the file, they'd hit the space bar or something, so I'd see two style111.JPG but one would actually be style111.JPG<space>.
I fixed them by doing ls with a ' ' at the end, eg ls *JPG' '. However, afterwards, I found what I think would have been an easier solution, the -e flag of cat. It puts a $ at the end of the line.
So, had I done it that way, I could have gone ls *JPG | cat -e and I would have gotten
style1111.JPG$
style111.JPG $
and all would have been clear from the beginning.
Anyway, I thought that was pretty neat, and thought I'd pass it along for those who didn't know it.