sed: unterminated 's' command`

arush436

I'm writing a nice regex to replace some IP's in a text file.

sed -r "s/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/${APP_IP}/g" /path/to/my/file

However it is giving: sed: -e expression #1, char 49: unterminated 's' command

I need the double quotes otherwise it replaces desired strings with the literal variable name: ${APP_IP}

What am I missing?

arush436

SOLVED: Seems to be working when I set the variable $APP_IP manually to the IP under test. If I capture the variable from the output (of a ping) it gives the error. Must be special characters in the variable. Thanks guys.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

sed command : unterminated `s' command

From Java

Sed unterminated 's command in script

From Dev

SED not working [unterminated `s' command]

From Dev

SED not working [unterminated `s' command]

From Dev

SED: unterminated `s' command at hyphen

From Dev

sed unterminated `s' command in subprocess.call

From Dev

sed unix error: unterminated 's' command

From Dev

Why does sed outputs "char 53: unterminated `s' command"

From Dev

bash - sed: -e expression #1, char 15: unterminated `s' command

From Dev

sed: -e expression #1, char 35: unterminated `s' command

From Dev

sed: -e expression #1, char 37: unterminated `s' command

From Dev

sed: -e expression #1, char XX: unterminated `s' command

From Dev

sed: -e expression #1, char 5: unterminated `s' command

From Dev

ssed Unterminated s command

From Dev

Another unterminated 's' command

From Dev

Unterminated `s' command

From Dev

sed Error sed: -e expression #1, char 7: unterminated `s' command

From Dev

Unterminated 's' command with 's/([\^][^])//g'

From Dev

Why is sed giving me an error about an unterminated `s'?

From Dev

Why is sed giving me an error about an unterminated `s'?

From Dev

sed, getting an error:sed: unterminated {

From Dev

unterminated `s' command, can't find my mistake

From Dev

css sed unterminated address regex

From Dev

Understanding a sed command: sed 's/\s\s*/ /g'

From Dev

unterminated address regex while using sed

From Dev

awk command giving "unterminated string" error

From Dev

sed's 'N' command working intermittently

From Dev

Is it portable to indent the argument to sed's 'i\' command?

From Dev

What is the purpose of "~" in the command "sed 's~ ~~g'"?

Related Related

HotTag

Archive