Start a Conversation

Unsolved

BD

15 Posts

236

May 10th, 2022 10:00

Naviseccli output

A few questions ....

  • Is it possible to export the output of naviseccli to a csv file?
  • Parsing output - Below is a section of a text file (disks) that I redirected from the command line:

naviseccli -h xxx.xxx.xxx.xxx -User xxxxx -Password xxxxx -Scope 0 getdisk >> disks.txt

Bus 0 Enclosure 0 Disk 0
Serial Number: 3SJ098Q7

Bus 0 Enclosure 0 Disk 1
Serial Number: 3SJ19ZPX

Bus 0 Enclosure 0 Disk 2
Serial Number: 0TGPK9HP

Bus 0 Enclosure 0 Disk 3
Serial Number: CVV9LNST

Bus 0 Enclosure 0 Disk 4
State: Removed

Bus 0 Enclosure 0 Disk 5
Serial Number: LVXZ386N

I'm trying to perform a search of the file to find a specific serial number, but I also need the previous line - to identify the disk location.

Example:

Bus 0 Enclosure 0 Disk 2

Serial Number: 0TGPK9HP

I would like to have the output as:

Bus 0 Enclosure 0 Disk 2     0TGPK9HP

Any idea how this can be accomplished?

 

 

No Responses!
No Events found!

Top