After call lsof Im looking the generic way to split every row to get in a string each cell of the table, the problem came because each time the command is called the size of every column can change.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
init 1 root cwd DIR 8,1 4096 2 /
kthreadd 2 root txt unknown /proc/2/exe
kjournald 42 root txt unknown /proc/42/exe
udevd 77 root cwd DIR 8,1 4096 2 /
udevd 77 root txt REG 8,1 133176 139359 /sbin/udevd
flush-8:1 26221 root cwd DIR 8,1 4096 2 /
flush-8:1 26221 root rtd DIR 8,1 4096 2 /
flush-8:1 26221 root txt unknown /proc/26221/exe
sudo 26228 root 5u unix 0xfff999002579d3c0 0t0 515611 socket
python 30077 root 2u CHR 1,3 0t0 700 /dev/null
.splitit. Perhaps you can use the headings to discover the field widths.