Alvin Alvin - 1 year ago 81
Linux Question

How to replace a string (characters and numbers)

I would like to replace rs101 to rs102, however it shows unterminated "s" command with this.

sed -i 's/rs101/rs102'

Is there any other solution ?

Answer Source

You should insert / after rs102 .

sed -i 's/rs101/rs102/'

Syntax for Search and Replace:

sed 's/search/replace/'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download