Yep, it's a right pain. I live in Cork kmkand frequently fly from/to Dublin due to price difference.
Best and cheapest way to get to Cork from Dublin Airport is AirCoach.ie. €30 return. If trains are your thing it's a bus into the city to Heston Station in Dublin, which is where the Cork trains depart. Definitely book online for trains else prices can be horrendous.