On Thu, Aug 28, 2003 at 02:13:44PM +0530, Ganesan R wrote: > >>>>> "Andreas" == Andreas Metzler <[EMAIL PROTECTED]> writes:
>> I am rather fluent in sh, but need to look up "shopt -s xpg_echo". This >> is tooo ugly. Just use >> - echo -e ",s/RUNFROM=.*/RUNFROM=$RET/\nw" \ >> + printf ",s/RUNFROM=.*/RUNFROM=$RET/\nw\n" \ >> or grab the patch from the bts and use sed instead of ed (you'll need to >> depend on sed >=3.95). > Or simply remove the -e option. builtin echo parses "\n" in bash as well as > dash. No. (i.e. depends on config): ------------------------ [EMAIL PROTECTED]:~> echo 'hello\nworld' hello\nworld [EMAIL PROTECTED]:~> bash --version GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu) Copyright 2001 Free Software Foundation, Inc. [EMAIL PROTECTED]:~> sash -a Stand-alone shell (version 3.4) Built-in commands are aliased to standard commands > echo -e 'hello\nworld' -e hellonworld ------------------------ Use printf, it is portable, readable and does not rely on the usage of a specific shell in a specific configuration. cu andreas