In Linux, there are many tools to process text and other forms of data. One tool that comes to mind is the AWK. The AWK scripting processes a file line by line and can produce a summary of its finding as header or footer.
TLDP provides a guide on AWK at http://tldp.org/LDP/abs/html/awk.html
EXAMPLE 1
Here is a demonstration of the AWK to extract the directories mounted.
STEP 1. Create an AWK script file called "myscript1.awk". This should contain two lines.
BEGIN{ printf("Display the third field\n"); }
{ print $3 }
STEP 2. Run the following command to use the AWK script.
mount -t ext2,ext3 | awk -f myscript1.awk
EXAMPLE 2
Without using an AWK script file, extract data from the file /etc/passwd and display the results to screen.
STEP 1. Run the following command
awk -F: '{ print $1 ":" $3 ":" $7 }' /etc/passwd
AWK have been used for more complex reporting but the above should give an idea of how this is done.
Looking at alternative computer software solutions for a variety of reasons. This includes price, computer security, virus prevention and reliability. Here are my notes and great that if it helps you, otherwise please understand what you are doing and not follow blindly. All works expressed are my own and does not necessarily express the products or organisations mentioned here.