[SLUG] Q: Fileglobbing with whitespace escaping (in bash, zsh, or any other shell you prefer)?

From: Ben Ostrowsky (ostrowb@tblc.org)
Date: Thu Apr 25 2002 - 09:20:16 EDT


What am I doing wrong here? The subdirectories of the context in which
it's executed have spaces in their names, and bash is trying to cd to
each word in the directory's name separately, so I get something like:

No such directory 'Attack'
No such directory 'of'
No such directory 'the'
No such directory 'Clones'

Here's my code:

#!/bin/bash
for i in `find -type d`; do {
  cd \"$i\" ;
  echo Changing directory to \"$i\" ;
  ls -al ;
# bladeenc -br 160 -prio=normal *wav ;
  cd .. ;
  }
done;

Anyone know how to fix it, or some other way to recurse through
subdirectories and bladeenc all the WAV files?

Ben



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:38:08 EDT