Sed unterminated 's command in script

Viewed 216

inside minor1.sed

sed -r 's/8/1/g' phone.txt

inside phone.txt

(866) 879-7647

(888) 474-7424

(371) 670-6006

(866) 266-5588

(844) 415-3955

(800) 237-2747

command issued

sed -r -f minor1.sed phone.txt

no matter what I do im given the unterminated 's command error.

1 Answers

minor1.sed should contain only sed expression, s/8/1/g in your case:

val@chi:~$ cat minor1.sed
s/8/1/g
val@chi:~$ sed -r -f minor1.sed phone.txt
(166) 179-7647
(111) 474-7424
(371) 670-6006
(166) 266-5511
(144) 415-3955
(100) 237-2747
Related