TuskenTower on 23 Aug 2009 19:11:10 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] the character least likely to find in a Unix file name

One more question on this.  Which code pattern would you prefer for
modifying $PATH?  We have an env var that is in $PATH and we are
replacing it with a new one.  That is why the sed command is built
using double quotation marks and have dollar-variables in them.

  PATH=`echo $PATH | sed "s"'$'"$old_phat"'$'"$new_path"'$'`


  PATH=`echo $PATH | sed "s;$old_path;$new_path;"`

Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug