You can use table.concat(table) to put all of the values together in one mooshed bit, or you can use a separator after your table, like this:
i = fs.list("/")
list = table.concat(i, ", ") --will separate with a comma and space between values
print(list)
The above code will print every value, and separate each value with a comma and a space(", ").
Alternatively, you can use a for loop to accomplish this.
list = fs.list("/")
for i,v in ipairs(list) do --starting a loop to run for values in list
--i being the iterator, v being the value
print(v) --print value
end
--OR
list = fs.list("/")
for i = 1,#list do --starts our loop, starting at 1, ending at how many items are in list
print(list[i]) --will print the indexed value of list on the position indicated by i, the iterator.
end
Both of the above for loops will do the same thing. The syntax is just different.