Quote:
Originally Posted by diamond_D
How can I capture the results of 'ls -l' to store in an array. This way I can create a seperate function to manipulate the array elements as needed.
|
I think you're on the wrong track, this sounds too complicated. Also,
don't parse ls.
Code:
for file in "${item}"/* ; do
if [ -f "${file}" ] ; then
echo "Here is output from ${file}" >> content.txt
cat "${file}" >> content.txt
fi
done