0

I was trying to echo the SNMP configuration inside the /etc/snmp/snmpd.conf file, however, i noticed that it is removing "" while echoing the text inside the configuration file..... i have tried out below ways but couldn't figure out...... Kindly help!!!! OS: Oracle Linux Server release 6.4 enter image description here

ilkkachu
  • 138,973

1 Answers1

0

Quotes (either single ' or double " quotes) are used to quote other special characters, like whitespace and glob characters, or other quotes:

$ echo "*"
*
$ echo "'"
'
$ echo '"ab""c"'
"ab""c"

Or you could use backslashes to escape the quotes:

$ echo \"abc\"
"abc"

The difference between single and double quotes is that within double-quotes backslashes (used for escaping other characters) and dollar signs (used for parameter expansions and command substitutions) are still special. Within single-quotes they are not.

See also

ilkkachu
  • 138,973