Skip to main content
deleted 4 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

If you prefer using double quotes, you domust not have to escape the brackets ([]), but only the double quotes (""""):

if [ "$line" == "#orb_plugins = [\"local_log_stream\", \"iiop_profile\", \"giop\", \"iiop\"];" ]

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

If you prefer using double quotes, you do not have to escape the brackets ([]), but only the double quotes (""):

if [ "$line" == "#orb_plugins = [\"local_log_stream\", \"iiop_profile\", \"giop\", \"iiop\"];" ]

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

If you prefer using double quotes, you must not escape the brackets ([]), but only the double quotes (""):

if [ "$line" == "#orb_plugins = [\"local_log_stream\", \"iiop_profile\", \"giop\", \"iiop\"];" ]
added 222 characters in body
Source Link
Lambert
  • 12.8k
  • 2
  • 28
  • 35

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

If you prefer using double quotes, you do not have to escape the brackets ([]), but only the double quotes (""):

if [ "$line" == "#orb_plugins = [\"local_log_stream\", \"iiop_profile\", \"giop\", \"iiop\"];" ]

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.

If you prefer using double quotes, you do not have to escape the brackets ([]), but only the double quotes (""):

if [ "$line" == "#orb_plugins = [\"local_log_stream\", \"iiop_profile\", \"giop\", \"iiop\"];" ]
Source Link
Lambert
  • 12.8k
  • 2
  • 28
  • 35

Most simple method is to use single quotes on the right hand side:

if [ "$line" == '#orb_plugins = ["local_log_stream", "iiop_profile", "giop", "iiop"];' ]

This way the string to be matched is interpreted literally.