I like both.
My choice usually depends on the map/level I'm playing on. For example in Call of Duty 4, I'd use a sniper rifle over a shotgun on Crash, but using a sniper on Shipment would just be silly. Although, usually in games like COD4 when I'm fighting in close range, I prefer some sort of SMG, like a P90.
However, I would probably lean further towards the sniper rifle in general, especially in games like Battlefield, where you can sit and pick off enemies around control points to assist your team. I like bolt action rifles better than straight scoped sniper rifles though. The hunting rifle is a staple weapon of mine in Fallout 3, and in most WW2 games the Kar98k will be my primary weapon for most of the fighting. (For some reason I just prefer it over the M1 Garand. Besides, since it's one of the enemies main weapons too, I never run out of ammo.
)