Alvin
Alvin

Reputation: 67

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' file.name.

Is there any other solution ?

Upvotes: 0

Views: 41

Answers (1)

Mustafa DOGRU
Mustafa DOGRU

Reputation: 4112

You should insert / after rs102 .

sed -i 's/rs101/rs102/' file.name.

Syntax for Search and Replace:

sed 's/search/replace/' file.name

Upvotes: 1

Related Questions