#!/bin/bash
rx ='^([^,]*),([^,]*),([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(shooting|judo),[^,]*,[^,]*,[^,]*,[^,]*)$'
repl ='\1,\U\2\E,\3'
s ='id,name,nationality,sex,date_of_birth,height,weight,sport,gold,silver,bronze,info
736041664,A Jesus Garcia,ESP,male,1969-10-17,1.72,64,athletics,0,0,0,
132041664,A Jesus Garcia,ESP,male,1969-10-17,1.72,64,shooting,0,0,0,'
sed -E "s/$rx /$repl /" <<< "$s "
IyEvYmluL2Jhc2gKcng9J14oW14sXSopLChbXixdKiksKFteLF0qLFteLF0qLFteLF0qLFteLF0qLFteLF0qLChzaG9vdGluZ3xqdWRvKSxbXixdKixbXixdKixbXixdKixbXixdKikkJwpyZXBsPSdcMSxcVVwyXEUsXDMnCgpzPSdpZCxuYW1lLG5hdGlvbmFsaXR5LHNleCxkYXRlX29mX2JpcnRoLGhlaWdodCx3ZWlnaHQsc3BvcnQsZ29sZCxzaWx2ZXIsYnJvbnplLGluZm8KNzM2MDQxNjY0LEEgSmVzdXMgR2FyY2lhLEVTUCxtYWxlLDE5NjktMTAtMTcsMS43Miw2NCxhdGhsZXRpY3MsMCwwLDAsCjEzMjA0MTY2NCxBIEplc3VzIEdhcmNpYSxFU1AsbWFsZSwxOTY5LTEwLTE3LDEuNzIsNjQsc2hvb3RpbmcsMCwwLDAsJwoKc2VkIC1FICJzLyRyeC8kcmVwbC8iIDw8PCAiJHMi
stdout
id,name,nationality,sex,date_of_birth,height,weight,sport,gold,silver,bronze,info
736041664,A Jesus Garcia,ESP,male,1969-10-17,1.72,64,athletics,0,0,0,
132041664,A JESUS GARCIA,ESP,male,1969-10-17,1.72,64,shooting,0,0,0,