Hi all,
I am doing some data extraction but got some difficulty in extracting from multiple files, I really appreciate your help in this situation:
I have many patient profile in separate folders, e.g patient1
; patient2
; patient3
; ...
Each folder contain data files: test1
; test2
; test3
; test4
I would like to count the number of occurrences of the string "hgc" in each test file in each patient folder and summary this values in an only file following this form:
patient1 value1 value2 value3 value4 #(each value is corresponded to a test file, from test1 to test4)
patient2 value1 value2 value3 value4
patient3 value1 value2 value3 value4
...
I was trying to fill this form manually using grep
and wc
command, but it would take forever if number of patient is large.
I really appreciate any help, thanks a lot!
Thank you very much!