I have a script that lists a bunch of files that match a certain criteria. It outputs filenames only and there is a bunch of text that is unnecessary.
An example string is:
What I'd like to achieve in the output is:
I've been able to replace the underscores but I've had no luck in trimming the [CRC32].mkv successfully.
Also I limit the number of characters and place an ellipsis at the end if they extend beyond 28 characters but even if it does not go beyond 28 characters, it still appends the ellipsis on the end.
The code for that is:
print substr( $0, 0, 28 )"[…]"}
Help on either of these problems would be much appreciated.