kristo5747
Programmer
I am parsing text files looking for specific entries like so
This gives me an output like so
The problem is that some files do not have the same number of fields. How can I do something like this?
Could this be done?
Code:
grep -e 'Model' -e 'Manufacturer' -e 'Man Date' -e 'SW Version' -e' SW Name' -e 'HW Version' -e 'Receiver ID' JGMDTV356.HDD
This gives me an output like so
Code:
Model = HR24
Manufacturer = 100
Man Date = 04/14/2010
SW Version = 4D1
HW Version = 2.3
Receiver ID = 035635905389
Model = WDCWD5000AVVS-63M8B0 (Dragonfly-0)
The problem is that some files do not have the same number of fields. How can I do something like this?
Code:
Model = HR24
Manufacturer = 100
Man Date = N/A
SW Version = 4D1
HW Version = N/A
Receiver ID = N/A
Model = N/A
Could this be done?