Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …
Tag: linux
replace in text with a var with some new lines
I have a var $MY_VAR which contains some new lines: And a file my_file.txt with a value that has to be replaced: I try to replace it using: That results into the following error: Answer I finally found a totally different solution by removing the value to replace and split my file into two parts: my_file_part…
FTDI FT232R force flushing FIFO
Is there a way to readout continuously or force-flush the RX fifo of FTDI FT232R. I want to timestamp the received bytes and therefore want to avoid that the received bytes are being sent in chunks. I want to force the chip to sent them via USB as they arrive. Answer FT232R AFAIK, it is impossible for FT232R.…
Cannot access to mysql 8.0 after change root password
I have mysql 8.0 work under centos 7 minimal. I change the password using this command mysqladmin -u root -p’Pass-123***’ password Myp@$$123 . After this , i try to access to mysql via mysql -p but i cannot access with the new password. How i can do this ? Answer You changed the password commandli…
MySQL Alter Table DB Freezes
I’m using Ubuntu 16.04.3 and mysql Ver 14.14 Distrib 5.7.22. When I try to alter my db table column with the following command the database appears to freeze; mysql> alter table records modify column name varchar(150); Table size is 2.8MiB (6,000 records). I’m simply trying to change the varcha…
Remove part of a string by using bash
I have the path /home/bamboo/bamboo-agent-home/xml-data/build-dir/NG-VOSGQL239-JOB1 and would like to get just /home/bamboo/bamboo-agent-home/xml-data/build-dir/ How can I delete the last part of the path if it can be with different lengths by using Bash? Answer Using bash regex =~:
Python Makefile Libraries
Although it may sound trivial how should I import libraries in Python makefiles? I am creating a basic Python makefile such as: However I am using specific libraries inside my_file.py, not included/imported in the basic package, for instance: xlswriter. So if someone tries to run the code they must type in te…
How to create multiple URLs for JIRA and Confluence?
Task: We have a several DNS aliases (ex. project1.domain.com, project2.domain.com) DNS aliases connected to JIRA Server by IP Need link, ex. from project1.domain.com to jira.domain.com/project/TEST1 Need link, ex, from project2.domain.com to jira.domain.com/project/TEST2 How next? any ideas? Thank you for the…
yum dependency resolution behaves differently in docker build vs docker run
It appears that yum’s dependency resolution behaves differently depending on whether it is invoked from the RUN statement of a Dockerfile, or from docker run. Consider this Dockerfile: The docker build fails on the last command. The full output is included below, but basically yum selects packages for b…
Bash scripting for create array from file and use each value on a curl URL
I am working on a bash script and I got a list of IP’s that I wanted to add one by one in a CURL command. For example given list on a file named list.txt I wanted to add each value on curl command Where $ARRAYVALUE is the IP address to be used on the command. I will appreciate any