I am attempting concatenate file names to use in a ftp mdelete command.  Each file name needs to be separated by a space in order for the mdelete command to work.  The $i variable is in a loop and I am attempting to assign the file name located into $i to $FILESTODELETE in addtion to the file names already in $FILESTODELETE  for i in `ls`    do        $FILESTODELETE = $FILESTODELETE $i         .....     END......     mdelete $FILESTODELETE
concatenating file names in a variable
shell script;ksh;variable
set -- *filenames=$*As long as you haven't modified your environment's value for $IFS, the above is all you need to get all of the names of not-dot files in the current directory into a single string as divided by spaces and sorted by locale in any POSIX shell. If you have modified $IFS, then whatever its first character is will sub for the single space divider just mentioned instead.Note, though, that the above is no guarantee that said filenames don't also contain spaces, or newlines, or basically any character but NUL or / - those probably aren't in the filenames.