Link to home
Start Free TrialLog in
Avatar of sheepfarmer
sheepfarmer

asked on

Bash shell unwanted file expansion at the space character

I'm trying to process a bunch of subdirectories that have spaces in the name.
The following bash script is expanding $thisfile at the space, so the file command fails as it never gets the full path/filename
How can this be fixed.

Oddly,
  echo $thisfile
does not expand $thisfile

Thanks
SF


==============================
find . -print | while read thisfile
do
file $thisfile
done
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sheepfarmer
sheepfarmer

ASKER

Thanks for the solution - embarrassingly simple :)
SF