I have a timecode that I need to change. It is in the format of 00:00:00 It needs to change to 00:00.00
The code I have so far:
Code:
timecode=00:00:00
newtimecode=$(echo $timecode | cut -d: -f1):$(echo $timecode | cut -d: -f2).$(echo $timecode | cut -d: -f3))
Is there a cleaner way to do this? Something like
Code:
newtimecode=$(echo $timecode | sed -e 's/:$//')
Obviously that doesn't work unless the last character is :
Does anyone have a cleaner solution, or should I work with what I have?