I'm having a small issue with the following input from lsblk:
$ lsblk -d --output NAME,MODEL,SIZE
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 14.9G 0 disk
If I parse it with table-parser, there is no RM property, and the RM value gets added to MAJ:MIN instead:
tableParser = require('table-parser')
input = '''
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 14.9G 0 disk
'''
parsedData = tableParser.parse(input)
console.log(parsedData)
[ { NAME: [ 'sdb' ],
'MAJ:MIN': [ '8:16', '1' ],
SIZE: [ '14.9G' ],
RO: [ '0' ],
TYPE: [ 'disk' ] } ]
I'm having a small issue with the following input from
lsblk:If I parse it with
table-parser, there is noRMproperty, and theRMvalue gets added toMAJ:MINinstead:[ { NAME: [ 'sdb' ], 'MAJ:MIN': [ '8:16', '1' ], SIZE: [ '14.9G' ], RO: [ '0' ], TYPE: [ 'disk' ] } ]