I am wondering is it possible to echo values like below described? The situation is - there are too many "doc" files named like "PLCI507_01234567.doc", and there is a Form in a text file named "form.txt" looks like below;
--------------------------------------------------------------------
Date:
Count :
--------------------------------------------------------------------
ID | Host | md5sum | Created |
--------------------------------------------------------------------
| | | |
| | | |
--------------------------------------------------------------------
I am already able to create files in the same format for each documents but now I want all the information in a single form and the form should be updated with file informations ie. file name, created date, md5sum etc.
md5sum = md5sum PLCI507_01234567.doc | awk '{ print $1 }' #sum of each file
Created = date +"%d/%m/%Y" #date of form update
The updated form.txt should be like below.
--------------------------------------------------------------------
Date: 4/14/2011
Count : 4
--------------------------------------------------------------------
ID | Host | md5sum | Created |
--------------------------------------------------------------------
01234567 | PLCI507 | 2b3dbf39a65eb140a163401001e32fb2 | 14/03/2011 |
01234560 | PLCI512 | 7aa31c83cc1b78fa9ae60460e1eb4731 | 22/04/2011 |
--------------------------------------------------------------------
Please some body help me with this. I am hoping that there must be some way to do it.
Thanks!!
