Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: John Stumbles Newsgroups: comp.os.linux.misc Subject: calling script function on output of find Date: 5 Jul 2011 10:01:50 GMT Lines: 24 Message-ID: <97g5odFp36U1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net C/uVSqd5cY7pcxN/pRpiWg4kHTO1V/eGMWw5QMe6a0h4iW3ZhY Cancel-Lock: sha1:E5rjw0saIg4ewg4IwXbnGZUML6k= User-Agent: Pan/0.133 (House of Butterflies) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.misc:1583 I have for f in `find $SOURCE_DIR -type f -size +0`; do process_file "$f" done where process_file is a function within the same bash script. However if $SOURCE_DIR has spaces in the name e.g. "/foo/bar/space in name" the script tries to process_file on parts of the pathname i.e. process_file /foo/bar/space process_file in process_file name This seems to be a limitation of the "for f in ..." construct and I should probably be doing something else - but what?! -- John Stumbles Pessimists are never disappointed