Recently, I used the os: cmd command to run commands on the local computer. When I use os: cmd. Not only do I get the output of my specified command, but the resulting lines and output produce or “insert” spaces and escape sequences in my output / line example:
os: cmd ("WMIC BIOS GET SERIALNUMBER").
It produces:
"SerialNumber \ r \ r \ nCN9B4R1 \ r \ r \ n \ r \ r \ n"
I tried searching for erlang documents, but nothing in the IO lib stretches me or rings me.
Thanks guys so much!
. os:cmd/1 . , , , , - , . io_lib, string, lists re . , string:tokens\2, ,
os:cmd/1
io_lib
string
lists
re
string:tokens\2
Output = os:cmd("WMIC BIOS GET SERIALNUMBER"), ["SerialNumber", SerialNumber] = string:tokens(Output, " \r\n").
Source: https://habr.com/ru/post/1680261/More articles:Using Contact Form 7 via WP REST API - wordpressRSA decryption of AES session key fails: AttributeError: 'bytes' object has no attribute 'n' - pythonIonic - scrollable list of large images - memory usage - performanceполучить "указатель" на NavigationBarView.java путем отражения - javaWhat is the difference between Apache kafka and ActiveMQ - spring-mvcGetting "typeError" "is not a function" when using .length - javascriptGet all open websites from Chrome in Python - pythonCoq: what is the difference between FSet and MSet? - setGetting THICK h1 - htmlelectronic compilation: Do not use Stylus - stylusAll Articles