I want to write a script that will find the second, third……occurrence
of number (the number is always before [F]) and add “a” to second occurrence,
“b” to third occurrence so on. Appreciate any suggestions or script
examples. OS 10.3
Thanks Ruby
Example of text file:
ORIGINAL
6000[F]This computer is fast.
1[F]This computer is fast.
6000[F]This computer is fast.
3[F]This computer is fast.
6000[F]This computer is fast.
CHANGE TO
6000[F]This computer is fast.
1[F]This computer is fast.
6000a[F]This computer is fast.
3[F]This computer is fast.
6000b[F]This computer is fast.