In one of my use case, required to trim the needed prefix by using below sed command. just curious to know is there any way to reduce the sed command (i mean simpler way instead of having long trim :) )
Actual content:
example1-m.uk.db.com
Required output:
example1
My sed command:
echo example1-m.uk.db.com | sed 's/[A-Z]*\-[a-z]\.[a-z]*[0-9]*\.[a-z]*[0-9]*\.[a-z]*//'
This gives me as output:
example1
Thank you.
Cheers , Velu