Hi,
I know I'm missing something basic here.
I need to process a file with info I gathered from our routers and put those into a database. So far, so good.
But now I need to find a line and get info from the next line
Quote:
### INVENTORY ###
NAME: "chassis", DESCR: "1841 chassis"
PID: CISCO1841 , VID: V05 , SN: FCZ1143R27B
|
I know the "chassis" will always be above the line of interest. So I need to find which linenumber contains "chassis", and then I need to unleash the power of awk on the next line ("awk -F: `{ print $2}`").
Can someone show me a good oneliner to achieve this?
Thanks