Skip to main content
2 of 3
edited tags
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265

Sed flag is not working

I have 3000 words that are repeated (ARG ARG ARG ARG ....)

I am trying to search and replace the 500th word by 'UIO'

I have been trying it with sed -i 's/ARG/UIO/500' filename.txt

I have also tried it with sed -i 's/ARG/UIO/500g' filename.txt but it does not work.

I does not report any mistake but it doesnt change anything in filename.txt either.

What would you recommend me to do?