I have a file called notification.txt that has data in it that I need to trim and pass the trimmed output to another command.
File is a random number of lines, could be 1, could be 100+, they look like this:
hostname.domain.xyz Notification
hostname.domain.xyz Notification
hostname.domain.xyz Notification
hostname.domain.xyz Notification
I'm looking to trim everything from the first . to the right and it will just leave me with the hostname in a array/variable that I can then use to pass to another command.