I have a list of hostnames in a file and want to separate them based on the last character. Write the host name to a file if the last character is odd number. How can I do this in one liner?
Example:
abc123
abc124
abc348
abc435
Desired output:
abc123
abc435
123bbb
,234ddd
,345fff
also to be considered odd? How about 123BBB...?