[clug] Spaces in filenames?

Russell Weatherburn russell at oxyoss.net
Wed Aug 20 10:27:51 EST 2003


 >
 >
 >Just to add another way to do it, in bash there is a variable called IFS
 >which by default is IFS=$' \t\n', which means spaces tabs and newlines.
 >You can change IFS to tabs and newlines in your script:
 >
 >#!/bin/sh
 >IFS=$'\t\n'
 >
 >for x in `ls *.wav`
 >do
 >  oggenc -q6 "$x"
 >done
 >
 >
 >
Very interesting.  I tested this, and noted that you don't actually need
the double quotes around the $x variable.

Could this be made to work with Apache?  Quite often windoze users end
up with spaces in their filenames, and I find it difficult to get them
from web pages (or samba services, sometimes).  Underscores get around
this issue, but sometimes the users want to have the spaces in there...

TIA,

Russell.

-- 
--

Russell Weatherburn

mailto:russell at oxyoss.net
http://www.oxyoss.net

Semper Fidelis







More information about the linux mailing list