Goal: Create an html table from the output of PS. I imagine it would go something like this: #!/bin/bash array=($(ps au)) for element in "${array[@]}"; do # Ideally the following line would be iterated until all of my tables were created conatining the PS values. echo ''; done # Since the done has been declared does this mean that it will only output the first 4 variables? I need all variables output into the above "format" so I can get the entire PS output into a table. echo '
${array[@]} ${array[@]} ${array[@]} ${array[@]}
'; # Finish off my wonderful table of PS to place into a site. #Example output of html table [ root ] [ 4438 ] [ 0.0 ] [ 3.0 ] [ 1566 ] [ /sbin/getty ] [ root ] [ 4438 ] [ 0.0 ] [ 0.0 ] [ 1567 ] [ /sbin/getty ] [ root ] [ 4438 ] [ 0.0 ] [ 5.0 ] [ 1562 ] [ /sbin/getty ]