Say I have the following file names from an ls
in a bash script:
things-hd-91-Statistics.db
things.things_domain_idx-hd-38-Data.db
In bash, how would it be able to get the first part of the string 'things'
in either case?
Basically remove the rest of the string past the first -
or .