fork(8) download
  1. #!/bin/bash
  2. rx='^([^,]*),([^,]*),([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,(shooting|judo),[^,]*,[^,]*,[^,]*,[^,]*)$'
  3. repl='\1,\U\2\E,\3'
  4.  
  5. s='id,name,nationality,sex,date_of_birth,height,weight,sport,gold,silver,bronze,info
  6. 736041664,A Jesus Garcia,ESP,male,1969-10-17,1.72,64,athletics,0,0,0,
  7. 132041664,A Jesus Garcia,ESP,male,1969-10-17,1.72,64,shooting,0,0,0,'
  8.  
  9. sed -E "s/$rx/$repl/" <<< "$s"
Success #stdin #stdout 0.01s 5396KB
stdin
Standard input is empty
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,