On Wed, Feb 20, 2008 at 11:42:38AM -0800, Natan Shar wrote: > > Here's what I am trying to do: > > I have a directory full of files. They are all image files and are numbered > using an id number, and underscore, and a detail number. Example: > > for item 123456, there may be from 0 to 25 images with names such as > '123456_0.JPG' or '123456_47.JPG' > > I need to collect the names of these files and then convert it into one > variable that I can then write into a database. My ideal example for the > above would be'123456_0.JPG,123456_47.JPG' a=(www/images/*);a=$(IFS=,; echo "${a[*]}";);a="${a//www\/images\/}";echo $a
-- Mike Stroyan <[EMAIL PROTECTED]>