Hi I an FTP folder called Input where I get sent files which look something like this:
"Guide to Iceland _ Chen-ping Wang itinerary T-987654987.pdf" "Guide to Iceland _ T-123654875 Chen-ping Wang itinerary.pdf"
Basicly the description of the file can be different but it always includes "T-" and some numbers.
I need to create a bash script that copies the file to the folder ../Output and renames the file so the "T-" and the numbers comes first, and then rest of the filename.
"T-123654875 - Guide to Iceland _ Chen-ping Wang itinerary.pdf"
I intended to use Grep to get the name right.
(.+)(T-\d+) and replacing it with
$2 - $1
But I can't get it to work right.