I have a variable COUNTRY=”INDIA” and another sets of variables:- INDIA_POPULATION=”5,00,00,000″, CHINA_POPULATION=”6,00,00,000″. In script I am trying to call them using command:- echo ${ ${COUNTRY}_POPULATION } But I am getting bad substitution error. Can someone please tell how to solve it ?? Answer You misplaced a bracket: {$COUNTRY}_POPULATION should be ${COUNTRY}_POPULATION. But even then it would not work as you
split directory with 10000 files into 2 directories [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I have directory /logos which contains approximately 10000 png images. Can you please suggest some script to make two new
CMake C++ Project librealsense: undefined reference to OpenGL with CLion
I am trying to integrate librealsense C++ CLion Project on Ubuntu 20.04. Compiling the Librealsense separately in the terminal works just as expected. the Project looks like this: RS_Pipeline . ├── build ├── main.cpp ├── CMakeLists.txt └── librealsense // the integrated lib ├── CMakeLists.txt ├── third-party // libs like GLFW and GLAD which are use in the examples ├── examples
Remove eveything before including colon and replace comma to newline
I am looking just to accommodate my query into one-liner. I have a below file content where i want to remove all before last colon(:) including itself and then replace comma(,) into newline to get the desired results. these all comma separated values are linux user ID’s File content: Already tried: working solution: result: Is there a better trick, please
PHP GD install issue
When I try to insatll PHP GD on linux I get the below error I tried to install lib gd with the command sudo yum install libgd.so.3 but I got error Can anyone please help on this ? Full yum command Answer For a proper repository configuration please follow the Wizard instructions It looks like the remi-safe repository is not
Environment variable error while trying to create a solver in OpenFOAM 9
I’m trying to create a solver in my /opt/OpenFOAM/OpenFOAM-9/applications/solvers/electromagnetics directory using sudo foamNewSource App newSolver. But, I keep getting the following error: And then, although I can see a newSolver.C file, I cannot see a Make directory and neither the rest of the files. I’m running EndeavourOS Linux x86_64 with kernel 5.15.6-arch2-1 and shell bash 5.1.12. I installed the openfoam-org
How can I check if the FPGA device is connected to the server?
For some reason, I can only remotely control a server containing FPGA (Intel Arria 10 GX FPGA). But when I use the command in Intel OpenCL for FPGA to find the driver, I cannot find the FPGA device that can be used. The command is as follows: aocl diagnose Output result: enter image description here Later, I used hardinfo to
Error connecting to MariaDB from Linux Environment: ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory
I am trying to connect to MariaDB using a python connector from a linux machine and while doing so I am getting the following error; Steps taken to Install mariadb from PYPI: pip install sqlalchemy pip install mariadb Note: additionally to pip install mariadb from PYPI, in a linux systems, the pip script additionally searched for mariadb_config which has to
BASH – Create arrays from lines of csv file, where first entry is array name
I’m learning to script in Bash. I have an CSV file, which contains next lines: Need to create arrays from this, where first entry is array name, eg. Here is my script: When I try with csv file, containing only two first string (numbers and colors), code works well. And if i try to with number, colors, custom-1, custom-2, there
Prompt Expansion ZSH Remove Hostname if entire PROMPT is too long
Currently, my zshrc looks like this influenced by this question and my other question what is currently working as expected it truncates the hostname and the username to constant values it dynamically truncates the entire PROMPT based on widthHelper() which allows me to resize my terminal and dynamically truncate the PROMPT Currently, I have this line working but not in