I am trying to parse through set of data from large txt file and only intersted in output below . i am using below awk command to get the output but it only shows first line , i need to see the rest of the output under hardware inventory. see below
]$ awk '{ if ( $0 ~ "^Hardware inventory" ) { print; getline tmp; print tmp } } ' wor3e01_result.txt
Hardware inventory:
Item Version Part number Serial number Description
Hardware inventory:
Item Version Part number CLEI code FRU model number
i tried your suggestion dos2unix and then ran the cmd awk with same result. i am still not able to see the desired output under hardware inventory.
any suggestion.
[b]dos2unix wor3e01_result.txt
$ awk '{ if ( $0 ~ "^Hardware inventory" ) { print; getline tmp; print tmp } } ' wor3e01_result.txt
Hardware inventory:
Item Version Part number Serial number Description
as you can see i expect to see something after hardware inventory but no output....i think i tmay be somethign to do with $0 but not sure..
any help will be appreciatiated...
---------- Post updated at 11:03 AM ---------- Previous update was at 10:57 AM ----------
jotne,
i tried your suggestion it did work but add some extra line on top whihc i realy dont need.. any idea