I’m trying update (using esp8266 microcontroller), update a DNS record hosted on DigitalOcean, using the API. How do I do to get HTTPS fingerprint using Linux CLI, for use on my code? Answer If you are using ESP (arduino IDE) library WiFiClientSecure.h, you need declare the “const” variable for fingerprint, like bellow: So anyhow, these values can be obtained running
Tag: command-line-interface
Validate text file presents expected fields for each data set
If one has a document in this format: You could verify each field exists for each data point manually by scrolling through thousands of lines in a file, but that would be inefficient and time consuming. I have thought about splitting the file and comparing each section using diff, but again, that would be prone to issues if there is
Bluemix CLI on Linux – websocket: bad handshake
I’m able to push and execute a Java sample application under a Bluemix account but when running the log command through the CLI prompt I receive an error message as shown below: My local platform the runs the CLI is Linux, see the currently installed version: When accessing the log records through the web console dashboard, all log information is
Duplicate MySQL Database in Linux CLI without Exporting an SQL File
I have a MySQL database which I want to duplicate using the Ubuntu Linux CLI without first having to download a MySQL file. I tried the following command: mysql -uroot -e’mysqldump -uroot db_old | mysql -uroot backup db_new;’ But got this error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that
Redirecting pv output to file
I’m using the pv utility to asses the speed of log entries being added in a log file, like this: This outputs the addition speed and refreshes every 5 sec: Now, I would like to redirect the current value (“10”) to a file and refresh it every 5s. Not append it, just overwrite the previous value in the file. Any
Delete files with string found in file – Linux cli
I am trying to delete erroneous emails based on finding the email address in the file via Linux CLI. I can get the files with find . | xargs grep -l email@example.com But I cannot figure out how to delete them from there as the following code doesn’t work. rm -f | xargs find . | xargs grep -l email@example.com