On Wed, Jun 13, 2007 at 11:34:53AM -0400, David Ford wrote:
> sed -i -s "s/THE_PLACEHOLDER/$MYNEW/g" sshd_config

That requires GNU sed 4.0 or higher.  Not everyone has that.  It's
far better to use perl instead.

  perl -pi -e "s/THE_PLACEHOLDER/$MYNEW/g" sshd_config

If you try your sed command on a non-GNU (or sufficiently old GNU)
system, you'll get an error:

  pegasus:~$ sed -i s/hi/bye/ foo
  sed: unknown option -- i
  usage:  sed script [-an] [file ...]
          sed [-an] [-e script] ... [-f script_file] ... [file ...]
  • Multihomed ... Nirmal Babu Puliyadi Suriya Kumar -X (npuliyad - HCL at Cisco)

Reply via email to