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

Re: bash: esc space not recognised in cat script ?



On Sun, Jul 13, 2003 at 04:47:39PM +0100, David selby wrote:
> Hello again, more thorny bash escaped space problems ...
> in $_tox is a file called "this is a test" ....
> Below is the portion of code that is causing problems ....
> 
> for _scantox in $_tox/* ; do
> _scantox=${_scantox// /\\ }

Perhaps that should be:

  _scantox="${_scantox// /\\ }"

?

(And, actually, I don't get why you're doing all this grotty
substitution stuff anyway. Just write $_scantox as "$_scantox" *every
time you use it*. bash handles spaces just fine as long as you quote
everything.)

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: