I’m pretty new to bash scripting and I’m attempting to write a script that does some basic operations. I want to check certain conditions and if they are met, terminate the script. So for example, I want to check whether the zip of files was successful: What happens though is that the exit 1 signa…
hwloc + lstopo Failing to Generate Topology on Dual-CPU Machine for Open-MPI
I’ve been attempting to setup a dual-cpu workstation (Dell Precision 7820) to run local parallel jobs utilizing openmpi 2.1.1-8 (as preinstalled on Ubuntu 18.04) however it fails to run with the following error: Examining the source code of pci-common.c you can find a comment before the assert(0) line t…
can not decrypt a message using openssl CLI, which was encrypted using openssl API
I was using the above code from Linux libcrypto AES-128 CBC Encryption/Decryption works on Ubuntu but not Raspberry Pi Modified the code slightly here If you run the code, you can see the below output. OpenSSL 1.1.1 11 Sep 2018 Original : 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F Encrypted :
GTK C++: Could not find signal handler Did you compile with -rdynamic?
I am new at GTK programming and I am facing the following issue. I can compile the code without any warnings or errors however when I execute the binary I get this massage and the button does not work. The error looks like this: (project:9686): Gtk-WARNING **: 16:26:31.359: Could not find signal handler ̵…
BASH: Filter list of files by return value of another command
I have series of directories with (mostly) video files in them, say I create a variable (video_dir) with the directory names (based on other parameters) and use that with find to generate the basic list. I then filter based on another variable (video_type) for file types (because there is sometimes non-video …
Count the number of characters, words and lines in PowerShell
In Linux we have the “wc” command which allows us to count the number of characters, words and lines in a file. But do we have a similar cmdlet in PowerShell. The Measure-Object cmdlet I tried could only count the number of lines but not the characters and words. Answer It counts the number of cha…
Building gRPC C++ with CMake on Linux
I’m trying to build gRPC (cpp) using CMake, but running into errors. I am able to successfully build gRPC with make per the instructions on the gRPC cpp page. Using make is deprecated, but CMake isn’t working for me. After following the instructions for downloading, cloning etc., I go to the ̶…
How to create folders and files from paths given in text file
I have a text file named creating.txt. In this file, each line has a path. If line starts with D it means that I have to create directory. If line starts with F, I have to create a file. For example: I need to go line by line, first check if first letter is D or F, then ignore the
output from popen doesn’t capture the error return
I was trying to capture the output from popen. The command that I am using is If you execute the above command in shell, you will get a message Terminated. My objective is to get the message Terminated in a buffer. I used the code below, but it didn’t work. Any ideas why it is not working ? Or if
Generate Gsettings schema files in linux
I am using Gsettings schema and have com.test.gschema.xml file. Now some keys inside the schema are enum and thus I require com.test.enums.xml file. Now I am using CMakeLists and thus can’t use gsettings_ENUM_NAMESPACE and gsettings_ENUM_FILES. On searching I found out that we can make use of glib-mkenu…