Help With 'for' Loop
mark.r.cullen at gmail.com
Fri Oct 14 13:02:48 PDT 2005
Drew Tomlinson wrote:
> Sorry to be such a pest today. I'm working on a sh script that uses a
> for loop. To test, I've written the following:
> for i in `/usr/bin/find /multimedia/Pictures -iname "*.jpg" -or -iname
> "*.gif" -print`
> echo -e "\n$i"
> The first line 'find' returns is "/multimedia/Pictures/1998
> Yet 'echo $i' only returns "/multimedia/Pictures/1998", stopping at the
> first space. Is it possible to get 'i' to represent the whole string
> that 'find' returns? If so, how?
Wild guess.. I would say try something like this...
for i in "`/usr/bin/find /home/mrboo -iname \"*.jpg\" -or -iname
echo -e "\n$i"
More information about the freebsd-questions