Check if a bridge is broken using the terminal

I wouldn’t want to clutter up my torrc with broken bridges, so I’m looking for a way to check them before adding them. Is there any way? I use GNU/Linux, so a way using the terminal would be preferable.

Thank you.