Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 y…
Running functions on bluetooth pair request
I’ve recently been learning electric circuitry using arduino and am looking to implement some changes to my Raspberry Pi application. I used this outdated tutorial a few years ago to create my pi bluetooth receiver which is working well at the moment (https://www.instructables.com/id/Turn-your-Raspberry…
Python datetime module problems
I’m using the datetime module in python3.7. When I run it from terminal it throws an error: Answer As you named your file datetime.py it may lead to confusion when calling it from outside. you should rename it to something else like my_datetime.py you also need to import datetime before using it
Print value of by loop in the end of line in bash
My file which run loop… My program file My result is My should I do so result come like I will be very glad if someone can help me out, Answer A possible solution would be to replace the line: echo $country >> /wdc-cron/count-$yesterday.txt with: printf “$country, ” >> /wdc-cron/…
Recursively change file name in folder and subfolders without changing file path
I have files in a format like 639486572_016b0f3d-9ec3-4ad1-84ae-c98b68390322.wav. The files reside in a folder and sub-folder format that resembles a date. ./2019/05/31/639486572_016b0f3d-9ec3-4ad1-84ae-c98b68390322.wav. The goal is to remove everything before and including the _. Which im able to do with ren…
similarity between the two files using grep, why this work: grep -i “-ffile1” file2
I have two files, file1 and file2, and want to find the similarity between the two files using grep. why -f should flow by the file name without spaces when I surround the -f file1 with quotes? this will work but this will not work but if I remove the quotes these two cases will work Answer By convention, one…
Start docker containers on linux system startup from user directory
I’ve downloaded two docker containers and already configure them. So, now all I want is to start them on system startup. They are in a path like /home/user/docker-mailserver /home/user/docker-webserver Hosted on a Ubuntu 18.04.01 (x64) On boot those docker containers are not running. On login, those doc…
How to get absolute value after subtracting the following value by the previous value in a file with multiple colomns?
I have a file contains numbers. 1 34 44 44 46 5 35 40 40 45 6 36 28 30 40 My goal is for each column to have the absolute value after subtracting the following value by the previous one as the below: 1 34 44 44 46 4 1 4 4 1 1 1 12 10 5 I
Can’t install latest angular cli on ubuntu
I’m trying to install angular via ubuntu. When I type the version commande node -v I get v12.14.1 Then I try to install npm package sudo npm install -g @angular/cli I get a warning npm WARN npm npm does not support Node.js v10.15.2 ng version I get angular-cli: 1.0.0-beta.28.3 The npm version is 6.13.4 …
Use awk command to get information below a pattern
I have a file with a wide range of information and I want to extract some data from here. I only will post here the interesting part. I want to extract IQ and JQ values as well as the J_ij[meV] value which is two lines above. I read this question How to print 5 consecutive lines after a pattern in