Despite the many similar questions, I am still confused.
qx|o1|md|4SAK9H7DQ876CAJ943,SJT8642H2DKT2CQ76,SQ5HKT653DAJCKT52|rh||ah|Board 1|sv|0|pg||
qx|o2|md|4SKQJ7642H9DQJ8CK8,STHAK8762D74CQJ65,SA85HQJTDAK96CT92|rh||ah|Board 2|sv|0|pg||
qx|o3|md|4ST3HAT9DAK96CA983,S76HK864D732CJT74,SAQJ82HJDQJT85CKQ|rh||ah|Board 3|sv|0|pg||
qx|o4|md|4SAQ4HT65432DAJ4CJ,SJT765HAKDT982C43,SK98HQJ9DK75CAQ92|rh||ah|Board 4|sv|0|pg||
In the above text, how do I find the every second occurrence of 4S
, and replace it with 3S
? (Or, in every other line, 4S
becomes 3S
.) (It is a given that the string 4S
occurs only once in every line.) I working in Sublime Text, or Notepad++ on Windows.
sed '2~2 s/4S/3S/' <datafile