The company cloud has hundreds of machines and I need to get some idea of the hardware so I find dmidecode for the functionality and need to parse its structured output and generate A Python datastructure, or maybe JSON.
I decide to access a Linux cloud machine remotely using vscode, as normal and run dmidecode, cut-n-paste a sample of its output into regex101, I do my due diligance and have a VNC session into another machine in the cloud and run dmidecode there on a different machine, take a look, and cut-n-paste an extended section of the data into regex101, scroll to the top of regex101, and write exploratary regexps as I match sections of the dmidecode output.
Matches start, but stop at the section of data copied from my VNC terminal?
Regex101 prints grey dots for spaces and a grey line for tabs and it is then plain to see that the commands output is indented with tabs when copied from VNC, but spaces from vscode.
Piping the output and grepping for initial tabs and comparing it to grepping for initial spaces shows that the dmidecode command indents with tabs. A web search showed that vscode terminal has an issue with outputting tabs and silently changes them to spaces. Furthermore, this issue is closed!?!
Vscode. it's a nice tool 'n all; but lying about data is a no-no. I expect you to get the fundamentals right as a solid base then add from there. X, vi, gvim make me not even think to check that tabs are visible (and their handling modifiable),
I wonder if other IDE's have this issue, lets start a list.
End.
No comments:
Post a Comment