I have multiple filenames in a directory which are delimited by dash. they have different length and characters. I want to delete everything until the first occurrence of dash.
Original files
NXNX LXMXTXD-X003452030-09 Feb 2024.pdf
Y LXD-X022203613-04 Dec 2023.pdf
TXR BXRXEX-X012306784-11 Feb 2022.pdf
Y LXMXTXD-X02503742-09 Feb 2024.pdf
Expected output where everything before the first dash and dash itself is removed.
X003452030-09 Feb 2024.pdf
X022203613-04 Dec 2023.pdf
X012306784-11 Feb 2022.pdf
X02503742-09 Feb 2024.pdf
Thanks!
I have tried bash with mv "$f" "${f#??}"
but this deletes characters which I cannot control to stop on the occurrence of first dash.
also tried rename but seems my OS not supporting it.